/* MIREVIEW LANDING PAGE - FINAL STABLE COMPREHENSIVE CSS (REM Based)
   모바일 버튼 너비 최적화 및 헤더 정렬 안정화 버전입니다.
*/

.main-content:has(.new-landing-wrapper),
main:has(.new-landing-wrapper),
#container:has(.new-landing-wrapper) {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important; 
    height: auto !important;
    position: static !important;
}

/* 랜딩페이지 자체 설정 (헤더 높이 대응) */
.new-landing-wrapper {
    font-family: 'Pretendard', -apple-system, sans-serif !important;
    background-color: #ffffff !important;
    width: 100% !important;
    line-height: 1.5 !important;
    color: #1f2937 !important;
    position: relative !important;
    /* PC 헤더 높이 100px 대응 */
    padding-top: 100px !important; 
    overflow: visible !important;
}

/* 모바일 상단 여백 (58px 대응) */
@media (max-width: 47.9rem) {
    .new-landing-wrapper {
        padding-top: 58px !important;
    }
}

/* 모든 자식 요소의 박스 사이징 통일 (격리 안쪽에서만 작동) */
.new-landing-wrapper * {
    box-sizing: border-box !important;
}

/* [2] 헤더 */
.header {
    height: 100px !important; /* PC 기본 높이 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important; 
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.98) !important;
    z-index: 1000 !important;
    border-bottom: 1px solid #eee !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
}

/* 모바일 헤더 높이 조정 */
@media (max-width: 47.9rem) {
    .header {
        height: 58px !important;
    }
}

/* [3] 텍스트 정렬 시스템 */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

@media (min-width: 48rem) {
    .md\:text-left { text-align: left !important; }
    .md\:text-center { text-align: center !important; }
}

/* [4] 유튜브 플레이 버튼 고정 */
#video-container {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    /* background-color: #000 !important; */ 
    z-index: 10 !important;
    cursor: pointer !important;
    overflow: hidden !important;
    border-radius: 1rem !important;
}

#video-container .absolute {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 20 !important;
}

#video-container iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
}

/* [5] 타이포그래피 */
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-3xl { font-size: 1.875rem !important; }
.text-4xl { font-size: 2.25rem !important; }
.text-5xl { font-size: 3rem !important; }

.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

.leading-none { line-height: 1 !important; }
.leading-tight { line-height: 1.25 !important; }
.leading-snug { line-height: 1.375 !important; }
.leading-normal { line-height: 1.5 !important; }
.leading-relaxed { line-height: 1.625 !important; }

/* [6] 색상 시스템 */
.text-brand { color: #FF5A28 !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }
.text-white { color: #ffffff !important; }

.bg-white { background-color: #ffffff !important; }
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-orange-50 { background-color: #fff7ed !important; }
.bg-blue-50 { background-color: #eff6ff !important; }
.bg-brand { background-color: #FF5A28 !important; }
.bg-black { background-color: #000000 !important; }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9) !important; }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95) !important; }

/* [7] 간격 및 정렬 시스템 */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.grid { display: grid !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
.shrink-0 { flex-shrink: 0 !important; }
.self-stretch { align-self: stretch !important; }

.flex-1 { flex: 1 !important; }

.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-10 { gap: 2.5rem !important; }
.gap-16 { gap: 4rem !important; }

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem !important;
}

.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
.py-12 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.py-20 { padding-top: 5rem !important; padding-bottom: 5rem !important; }

.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-32 { margin-bottom: 8rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* [8] 컨테이너 및 크기 제어 */
.max-w-6xl { max-width: 72rem !important; }
.max-w-5xl { max-width: 64rem !important; }
.max-w-4xl { max-width: 56rem !important; }
.max-w-3xl { max-width: 48rem !important; }
.max-w-lg { max-width: 32rem !important; }
.w-full { width: 100% !important; }
.w-10 { width: 2.5rem !important; }
.w-12 { width: 3rem !important; }

.w-\[70\%\] { width: 70% !important; }
@media (min-width: 48rem) {
    .md\:w-full { width: 100% !important; }
    .md\:w-12 { width: 3rem !important; }
}

.h-16 { height: 4rem !important; }
.h-32 { height: 8rem !important; }
.h-40 { height: 10rem !important; }
.h-48 { height: 12rem !important; overflow: hidden !important; }
.h-\[180px\] { height: 180px !important; }
.h-\[400px\] { height: 25rem !important; }
.h-full { height: 100% !important; }
.max-h-full { max-height: 100% !important; }
.aspect-\[9\/19\] { aspect-ratio: 9 / 19 !important; }

/* [9] 테두리 및 라운드 */
.border { border: 1px solid #e5e7eb !important; }
.border-8 { border: 8px solid !important; border-style: solid !important; }
.border-gray-800 { border-color: #1f2937 !important; }
.border-t { border-top: 1px solid #e5e7eb !important; }
.border-b { border-bottom: 1px solid #e5e7eb !important; }
.border-gray-100 { border-color: #f3f4f6 !important; }
.border-orange-200 { border-color: #fed7aa !important; }

.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.rounded-full { border-radius: 9999px !important; }

/* [10] 버튼 스타일 (모바일 최소너비 제거, PC 적용) */
.btn-new-white, .btn-new-orange {
    height: 3rem !important;
    padding: 0 1rem !important; 
    min-width: auto !important; /* 모바일은 글자 길이에 맞게 */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
}
.btn-new-white { background: #ffffff !important; border: 1px solid #333333 !important; color: #333333 !important; }
.btn-new-orange { background: #FF5A28 !important; color: #ffffff !important; border: none !important; }

/* [11] Sticky 탭 메뉴 고정 (헤더 58px 대응) */
.sticky { 
    position: -webkit-sticky !important; 
    position: sticky !important; 
    z-index: 50 !important; 
}
/* PC에서는 헤더가 100px이므로 top: 100px */
.top-\[58px\], .top-\[80px\] { 
    top: 100px !important; 
}

/* 모바일에서는 헤더가 58px이므로 top: 58px */
@media (max-width: 47.9rem) {
    .top-\[58px\], .top-\[80px\] { 
        top: 58px !important; 
    }
}

.tab-btn {
    flex: 1 !important;
    padding: 0.75rem 1.5rem !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}
.tab-content { display: none !important; }
.tab-content.active { display: block !important; animation: fadeIn 0.5s; }

.flex-nowrap { flex-wrap: nowrap !important; }
.overflow-x-auto { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
.scrollbar-hide::-webkit-scrollbar { display: none !important; }

@media (max-width: 47.9rem) {
    /* [1] 고정 컨테이너: 좌우 마진을 마이너스로 밀어 배경을 화면 끝까지 보냄 */
    .new-landing-wrapper .sticky.-mx-6 {
        margin-left: -1.5rem !important;
        margin-right: -1.5rem !important;
        width: calc(100% + 3rem) !important;
        padding-left: 0 !important;   /* 컨테이너 자체 패딩은 제거 */
        padding-right: 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }

    /* [2] 스크롤 영역: 실제 버튼들이 움직이는 통로에 패딩을 주어 
       첫 버튼이 화면 끝에 너무 붙지 않게 하고, 스와이프 시엔 끝까지 보임 */
    .new-landing-wrapper .overflow-x-auto {
        padding-left: 1.5rem !important;  /* 첫 버튼 왼쪽 여백 */
        padding-right: 1.5rem !important; /* 마지막 버튼 오른쪽 여백 */
        display: flex !important;
        gap: 0.5rem !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* [3] 버튼 스타일 보정: 글자 길이에 구애받지 않고 시원하게 노출 */
    .tab-btn {
        flex: none !important; /* 버튼이 찌그러지지 않게 고정 */
        min-width: 100px !important; /* 너무 좁게 나오면 이 값을 조절하세요 */
    }
}

/* [12] FAQ 전용 보정 */
.faq-q-box, 
[class*="shrink-0 w-10 md:w-12 bg-gray-50 rounded-lg"] {
    background-color: #f3f4f6 !important; 
    color: #FF5A28 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    align-self: stretch !important;
    margin-right: 0.5rem !important;
    padding: 0 0.5rem !important;
}

details summary div:not([class*="faq-q-box"]) { text-align: left !important; }
.new-landing-wrapper details > div { text-align: left !important; }
.new-landing-wrapper details div.border-t { border-top: none !important; }

details summary { list-style: none !important; }
details summary::-webkit-details-marker { display: none !important; }
details summary::marker { display: none !important; content: "" !important; }
summary { display: block !important; }

/* [13] 반응형 미디어 쿼리 (MD: 768px 이상) */
@media (min-width: 48rem) {
    .md\:flex-row { flex-direction: row !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .md\:text-4xl { font-size: 2.25rem !important; }
    .md\:py-20 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
    
    .md\:flex-none { flex: none !important; width: auto !important; }
    
    /* PC에서만 버튼 최소 너비 180px 유지 */
    .btn-new-white, .btn-new-orange, .md\:min-w-\[200px\] { 
        min-width: 11.25rem !important; 
    }
    
    .md\:h-\[240px\] { height: 15rem !important; }
    .md\:static { position: static !important; }
    .md\:bg-transparent { background-color: transparent !important; }
    .md\:backdrop-blur-none { backdrop-filter: none !important; }
    .md\:border-none { border: none !important; }
    .md\:justify-start { justify-content: flex-start !important; }
    .md\:justify-end { justify-content: flex-end !important; }
    .md\:flex-wrap { flex-wrap: wrap !important; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }