/* Footer専用CSS - スマホ対応修正版 */

footer {
    background: #ffffff;
    padding: 60px 0 30px !important;
    position: relative;
    margin: 0 !important;
    width: 100% !important;
    border-top: 1px solid #e9ecef;
}

/* Container確保 */
footer .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

/* Footer要素のリセット */
footer * {
    box-sizing: border-box;
}

/* メインFooterコンテンツ */
.footer-main {
    margin-bottom: 40px;
}

.footer-primary {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

/* Footer About セクション */
.footer-about-section {
    position: relative;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.footer-logo .jci-logo {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.footer-logo-text .logo-full {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 2px;
    font-weight: 400;
}

.footer-logo-text .logo-main {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.footer-about {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 30px;
    font-weight: 400;
}

.footer-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-stat {
    text-align: center;
}

.footer-stat-number.member-count {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    line-height: 1.2;
}

.footer-stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
}

.footer-stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #007bff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Quick Links */
.footer-links-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.footer-links {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

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

.footer-links a {
    color: #495057;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Contact Section */
.footer-contact-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.footer-contact {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-contact li {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.footer-contact .contact-icon {
    display: none;
}

.footer-contact .contact-content {
    width: 100%;
}

.footer-contact .contact-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.footer-contact .contact-value {
    font-size: 14px;
    color: #212529;
    font-weight: 500;
    line-height: 1.4;
}

.footer-contact a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 関連リンクセクション - 折りたたみ式 */
.footer-related-section {
    margin-top: 30px;
    border-top: 1px solid #dee2e6;
    padding-top: 30px;
}

.footer-related-toggle {
    text-align: center;
    margin-bottom: 25px;
}

.toggle-btn {
    background: white;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn:hover {
    background: #007bff;
    color: white;
}

.toggle-btn .icon {
    transition: transform 0.3s ease;
}

.toggle-btn.active .icon {
    transform: rotate(180deg);
}

/* 折りたたみコンテンツの高さとオーバーフロー処理 */
.footer-related-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.footer-related-content.active {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
}

/* グリッドレイアウト */
.footer-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

.footer-related-card {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease;
    margin-bottom: 10px;
}

.footer-related-card:hover {
    border-color: #007bff;
}

.footer-related-card:last-child {
    margin-bottom: 0;
}

.footer-related-card h4 {
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-related-card .card-icon {
    width: 28px;
    height: 28px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.footer-related-card ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-related-card li {
    margin-bottom: 8px;
}

.footer-related-card li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer-related-card a {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: block;
    padding: 4px 0;
}

.footer-related-card a:hover {
    color: #007bff;
    text-decoration: none;
}

.footer-related-card .card-note {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
    margin-left: 12px;
    margin-top: 4px;
}

/* 東北海道ブロック協議会用ワイドカード */
.footer-related-card--wide {
    grid-column: span 2;
}

/* 2列表示リスト(デスクトップ) */
.two-column-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 30px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.two-column-list li {
    margin-bottom: 0;
}

/* Copyright */
.footer-bottom {
    border-top: 1px solid #dee2e6;
    padding-top: 25px;
    text-align: center;
    background: #f8f9fa;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.copyright {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

.copyright-full {
    font-size: 12px;
}

/* レスポンシブ対応 */
@media (max-width: 1199px) {
    .footer-primary {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-contact-section {
        grid-column: 1 / -1;
        margin-top: 25px;
    }
}

@media (max-width: 767px) {
    footer {
        padding: 40px 0 20px !important;
    }
    
    .footer-primary {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-stats {
        justify-content: center;
    }
    
    /* ワイドカードをスマホでは通常幅に */
    .footer-related-card--wide {
        grid-column: span 1;
    }
    
    /* 2列リストをスマホでは1列に */
    .two-column-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* スマホでの関連リンクグリッド */
    .footer-related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding-bottom: 25px;
    }
    
    /* スマホでの折りたたみコンテンツ高さ */
    .footer-related-content.active {
        max-height: 3000px;
        padding-bottom: 10px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* スマホでのカード処理 */
    .footer-related-card {
        margin-bottom: 15px;
    }
    
    .footer-related-card:last-child {
        margin-bottom: 0;
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .footer-logo-text .logo-main {
        font-size: 16px;
    }
    
    .footer-contact li {
        padding: 12px;
    }
    
    /* 極小デバイスでの高さ調整 */
    .footer-related-content.active {
        max-height: 4000px;
    }
    
    .footer-related-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .footer-related-card:last-child {
        padding-bottom: 20px;
    }
}
