/* =================================
   Enhanced Footer - Premium UI Design
   "和の静寂と現代の洗練 - Zen meets Modern"
   ================================= */

/* CSS Custom Properties - 畳の色彩パレット */
:root {
    --tatami-green: #4a5d23;
    --tatami-beige: #f5f2e8;
    --tatami-gold: #d4a017;
    --tatami-brown: #8b7355;
    --tatami-shadow: rgba(139, 115, 85, 0.15);
    --tatami-light: rgba(245, 242, 232, 0.9);
    --breathing-duration: 3s;
    --ripple-duration: 0.6s;
    --transition-premium: cubic-bezier(0.23, 1, 0.32, 1);
}

/* プレミアム・フッターコンテナ */
.site-footer {
    position: relative;
    background: linear-gradient(135deg, 
        var(--tatami-beige) 0%, 
        #ebe5d0 35%, 
        #f8f4e6 65%, 
        var(--tatami-light) 100%);
    backdrop-filter: blur(10px) brightness(1.1);
    border-top: 3px solid var(--tatami-gold);
    overflow: hidden;
    animation: footerFadeIn 1.2s var(--transition-premium);
}

/* フッターのフェードイン効果 */
@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浮遊パーティクル（畳の埃と光の粒子） */
.footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--tatami-gold);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticle 12s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(100px, -100px) rotate(360deg);
        opacity: 0;
    }
}

/* フッターメインコンテンツ */
.footer-main {
    position: relative;
    z-index: 2;
    padding: 60px 0 40px;
    backdrop-filter: blur(5px);
}

/* 企業ロゴセクション - 最高優先度 */
.footer-logo {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    animation: breathe var(--breathing-duration) ease-in-out infinite;
}

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

.footer-logo-img {
    width: 180px;
    height: auto;
    transition: all 0.6s var(--transition-premium);
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--tatami-shadow);
}

.footer-logo-img:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px var(--tatami-shadow);
}

.footer-tagline {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--tatami-green);
    margin: 20px 0 15px;
    letter-spacing: 2px;
    opacity: 0.9;
    animation: breathe calc(var(--breathing-duration) * 1.5) ease-in-out infinite;
}

.footer-description {
    font-size: 1rem;
    color: var(--tatami-brown);
    line-height: 1.8;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0.85;
}

/* フッターセクション */
.footer-section {
    position: relative;
    transform: translateZ(0);
    will-change: transform, opacity;
    transition: all 0.4s var(--transition-premium);
}

.footer-section:hover {
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tatami-green);
    margin-bottom: 25px;
    position: relative;
    letter-spacing: 1px;
    transition: all 0.3s var(--transition-premium);
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: var(--tatami-gold);
    border-radius: 2px;
    transition: width 0.4s var(--transition-premium);
}

.footer-section:hover .footer-title::after {
    width: 60px;
}

/* プレミアム・フッターリンク */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
    position: relative;
}

.footer-links a {
    color: var(--tatami-brown);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    position: relative;
    display: inline-block;
    padding: 8px 0;
    transition: all 0.4s var(--transition-premium);
    overflow: hidden;
}

/* 畳の織り目を表現したテクスチャ */
.footer-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(212, 160, 23, 0.15), 
        transparent);
    transition: left 0.6s var(--transition-premium);
    z-index: -1;
}

.footer-links a:hover::before {
    left: 100%;
}

.footer-links a:hover {
    color: var(--tatami-green);
    padding-left: 12px;
    font-weight: 600;
    transform: translateX(5px);
}

/* 連絡先情報の強化 */
.footer-contact {
    background: var(--tatami-light);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 25px var(--tatami-shadow);
    backdrop-filter: blur(10px);
    transition: all 0.4s var(--transition-premium);
}

.footer-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--tatami-shadow);
}

.footer-contact p {
    margin: 12px 0;
    font-size: 1rem;
    color: var(--tatami-brown);
    transition: all 0.3s var(--transition-premium);
}

/* =================================================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ================================================================= */
@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 2rem !important;
        margin-top: 2rem !important;
    }
    
    .footer-container {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 0 15px !important;
    }
    
    .footer-row {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .footer-section {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }
    
    .footer-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }
    
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
    }
    
    .footer-links a {
        width: auto !important;
        max-width: 280px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        touch-action: manipulation !important;
        text-align: center !important;
    }
    
    .footer-contact {
        padding: 20px !important;
        margin: 1rem auto !important;
        max-width: 350px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .footer-contact p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin: 10px 0 !important;
    }
    
    .footer-social {
        justify-content: center !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    
    .footer-social a {
        width: 50px !important;
        height: 50px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
    }
    
    .footer-bottom {
        text-align: center !important;
        padding: 1.5rem 0 !important;
        margin-top: 2rem !important;
    }
    
    .footer-bottom p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* Disable hover effects on mobile */
    .footer-links a:hover {
        transform: none !important;
        padding-left: 16px !important;
    }
    
    .footer-contact:hover {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2rem 0 1.5rem !important;
    }
    
    .footer-container {
        padding: 0 10px !important;
    }
    
    .footer-section {
        margin-bottom: 1.5rem !important;
    }
    
    .footer-contact {
        padding: 15px !important;
        max-width: 320px !important;
    }
    
    .footer-links a {
        max-width: 260px !important;
        padding: 10px 12px !important;
    }
    
    .footer-social a {
        width: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 360px) {
    .footer-container {
        padding: 0 8px !important;
    }
    
    .footer-contact {
        max-width: 300px !important;
        padding: 12px !important;
    }
    
    .footer-links a {
        max-width: 240px !important;
        font-size: 15px !important;
    }
}

.footer-contact p:hover {
    color: var(--tatami-green);
    transform: translateX(3px);
}

/* プレミアム・ソーシャルメディアリンク */
.footer-social {
    display: flex;
    gap: 20px;
    justify-content: end;
    align-items: center;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    transition: transform 0.3s var(--transition-premium);
    position: relative;
    overflow: hidden;
}

.social-link i {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* X = 黒背景＋白ロゴ */
.social-link.twitter-highlight {
    background: #000000;
}
.social-link.twitter-highlight .social-icon {
    /* PNG上に背景がある場合でもそのまま表示（黒背景＋白X） */
    filter: brightness(0) invert(1);
}

/* Instagram = グラデーション背景＋公式アイコン */
.social-link.instagram-highlight {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(188, 24, 136, 0.3) !important;
}
.social-link.instagram-highlight .social-icon,
.social-link.instagram-highlight img {
    display: none !important; /* 画像は非表示 */
}
.social-link.instagram-highlight i {
    font-size: 24px !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* ラベルを視覚的に非表示（スクリーンリーダー向け） */
.social-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* フッターボトム */
.footer-bottom {
    background: var(--tatami-green);
    color: var(--tatami-beige);
    padding: 25px 0;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(245, 242, 232, 0.1), 
        transparent);
    animation: footerBottomShine 4s ease-in-out infinite;
}

@keyframes footerBottomShine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* リップル効果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.6);
    transform: scale(0);
    animation: ripple var(--ripple-duration) linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* レスポンシブアコーディオン */
@media (max-width: 991px) {
    .footer-section {
        margin-bottom: 30px;
    }
    
    .footer-title {
        cursor: pointer;
        position: relative;
        padding-right: 30px;
        user-select: none;
    }
    
    .footer-title::after {
        content: '▼';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.8rem;
        transition: transform 0.4s var(--transition-premium);
    }
    
    .footer-section.expanded .footer-title::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .footer-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--transition-premium);
    }
    
    .footer-section.expanded .footer-content {
        max-height: 500px;
    }
}

/* モバイル最適化 */
@media (max-width: 767px) {
    .footer-main {
        padding: 40px 20px 30px;
    }
    
    .footer-logo-img {
        width: 140px;
    }
    
    .footer-tagline {
        font-size: 1.2rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .footer-contact {
        padding: 20px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    /* モバイルでパーティクルを軽量化 */
    .particle {
        animation-duration: 8s;
    }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .footer-links a {
        color: var(--tatami-green);
        font-weight: 600;
    }
    
    .footer-contact {
        border: 2px solid var(--tatami-green);
    }
}

/* 節電モード・アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .footer-particles {
        display: none;
    }
}

/* フォーカス管理 */
.footer-links a:focus,
.social-link:focus,
.footer-title:focus {
    outline: 3px solid var(--tatami-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(212, 160, 23, 0.3);
}

/* カスタムスクロールバー */
.footer-content::-webkit-scrollbar {
    width: 8px;
}

.footer-content::-webkit-scrollbar-track {
    background: var(--tatami-beige);
}

.footer-content::-webkit-scrollbar-thumb {
    background: var(--tatami-gold);
    border-radius: 4px;
}

.footer-content::-webkit-scrollbar-thumb:hover {
    background: var(--tatami-green);
}

/* 印刷対応 */
@media print {
    .footer-particles,
    .social-link::before {
        display: none !important;
    }
    
    .site-footer {
        background: white !important;
        box-shadow: none !important;
    }
    
    .footer-links a {
        color: black !important;
    }
}

/* FontAwesome アイコン汎用スタイル */
.social-link i {
    color: #ffffff;
    font-size: 24px;
}