/* =============================================
   모바일 푸터 최적화 스타일 - 초강력 중앙 정렬
   ============================================= */

/* 모바일 푸터 - 768px 이하 */
@media screen and (max-width: 768px) {
    /* 푸터 전체 강제 중앙 정렬 */
    footer,
    .footer,
    footer.footer {
        background-color: #0d0d0d !important;
        color: #ffffff !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* 모든 푸터 하위 요소 강제 중앙 정렬 */
    footer *,
    .footer * {
        text-align: center !important;
    }
    
    /* 푸터 상단 영역 */
    .footer-top {
        padding: 3rem 1rem !important;
        background-color: #0d0d0d !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* 푸터 컨텐츠 컨테이너 - 중앙 정렬 */
    .footer .container,
    .footer-top .container,
    .footer-bottom .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
    
    /* 푸터 컨텐츠 그리드 - 강제 중앙 정렬 */
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3rem !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    /* 푸터 로고 및 회사 정보 - 강제 중앙 정렬 */
    .footer-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1rem !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* 모든 헤딩 태그 중앙 정렬 */
    .footer h1,
    .footer h2,
    .footer h3,
    .footer h4,
    .footer h5,
    .footer h6,
    .footer-info h3,
    .footer-logo {
        font-size: 1.8rem !important;
        font-weight: 900 !important;
        color: #ffffff !important;
        margin: 0 auto 0.5rem auto !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* 모든 p 태그와 설명 텍스트 중앙 정렬 */
    .footer p,
    .footer-info p,
    .footer-desc {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        line-height: 1.6 !important;
        text-align: center !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* 푸터 링크 영역 - 강제 중앙 정렬 */
    .footer-links {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        padding: 0 1rem !important;
        text-align: center !important;
    }
    
    /* 푸터 컬럼 중앙 정렬 */
    .footer-column {
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .footer-column h4 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #ff3333 !important;
        margin: 0 auto 1rem auto !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    .footer-column ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .footer-column li {
        margin-bottom: 0.8rem !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    .footer-column a,
    .footer-column li a {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.6) !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        display: inline-block !important;
        text-align: center !important;
        width: auto !important;
    }
    
    .footer-column a:hover {
        color: #ff3333 !important;
        transform: translateY(-2px) !important;
    }
    
    /* 푸터 연락처 정보 - 강제 중앙 정렬 */
    .footer-contact {
        width: calc(100% - 2rem) !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        padding: 2rem 1rem !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-radius: 12px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .footer-contact h4 {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #ff3333 !important;
        margin: 0 auto 1.5rem auto !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* 연락처 아이템 중앙 정렬 */
    .footer-contact .contact-item,
    .contact-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.8rem !important;
        font-size: 0.9rem !important;
        margin: 0 auto 1rem auto !important;
        color: rgba(255, 255, 255, 0.7) !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .contact-item svg {
        width: 18px !important;
        height: 18px !important;
        stroke: #ff3333 !important;
        flex-shrink: 0 !important;
    }
    
    /* 연락처 텍스트만 왼쪽 정렬 유지 */
    .contact-item span,
    .contact-item a {
        color: rgba(255, 255, 255, 0.7) !important;
        text-decoration: none !important;
        transition: color 0.3s ease !important;
        text-align: left !important;
        flex: 1 !important;
    }
    
    .contact-item a:hover {
        color: #ff3333 !important;
    }
    
    /* 푸터 하단 영역 - 강제 중앙 정렬 */
    .footer-bottom {
        padding: 1.5rem 1rem !important;
        background-color: #000000 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .footer-bottom-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1rem !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* 저작권 텍스트 중앙 정렬 */
    .footer-bottom .copyright,
    .copyright,
    p.copyright {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.5) !important;
        text-align: center !important;
        line-height: 1.4 !important;
        width: 100% !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    /* 법적 링크 중앙 정렬 */
    .footer-bottom .footer-legal,
    .footer-legal,
    div.footer-legal {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    .footer-legal a {
        font-size: 0.8rem !important;
        color: rgba(255, 255, 255, 0.5) !important;
        text-decoration: none !important;
        padding: 0.3rem 0.8rem !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 20px !important;
        transition: all 0.3s ease !important;
        display: inline-block !important;
    }
    
    .footer-legal a:hover {
        color: #ff3333 !important;
        border-color: #ff3333 !important;
        transform: translateY(-2px) !important;
    }
}

/* 작은 모바일 기기 대응 (480px 이하) */
@media screen and (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    
    .footer-desc {
        font-size: 0.85rem !important;
        padding: 0 1rem !important;
    }
    
    .contact-item {
        font-size: 0.85rem !important;
    }
    
    .footer-legal {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    .footer-legal a {
        width: 200px !important;
        text-align: center !important;
    }
}

/* 가로 모드 대응 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .footer-top {
        padding: 2rem 1rem !important;
    }
    
    .footer-content {
        gap: 2rem !important;
    }
    
    .footer-links {
        grid-template-columns: repeat(4, 1fr) !important;
        max-width: 100% !important;
    }
}

/* 최우선 순위 적용을 위한 추가 선택자 */
@media screen and (max-width: 768px) {
    body footer,
    body .footer,
    html body footer,
    html body .footer {
        text-align: center !important;
    }
    
    body footer *:not(.contact-item span):not(.contact-item a),
    body .footer *:not(.contact-item span):not(.contact-item a) {
        text-align: center !important;
    }
}
