/* Use Case 페이지 - product.css 스타일 재사용 */
@import "product.css";

/* Use Case 페이지: 어두운 배경에서 햄버거 아이콘 가시성 확보 */
body.page-use-case .header-menu-toggle span {
    background-color: #ffffff !important;
}

/* ========== 스크롤 진입 애니메이션 (공통) ========== */
@keyframes fadeUpIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 초기 상태 (애니메이션 전) */
.residential-hero-title,
.residential-video-wrap,
.residential-problems-block,
.residential-problem-row,
.jungmun-block-wrapper,
.mobile-integration-section,
.compare-closing-wrap,
.compare-intro-block {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 안전 폴백: active 카테고리 콘텐츠는 항상 보이도록 보장 */
.category-section.active .residential-hero-title,
.category-section.active .residential-video-wrap,
.category-section.active .residential-problems-block,
.category-section.active .residential-problem-row {
    opacity: 1;
    transform: none;
}

.residential-problems-block .residential-pain-card {
    opacity: 0;
    transform: translateY(20px);
}

.category-section.active .residential-problems-block .residential-pain-card {
    opacity: 1;
    transform: none;
}

.residential-problems-block.animate-in .residential-pain-card {
    animation: fadeUpIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* animate-in 시 표시 */
.residential-hero-title.animate-in,
.residential-video-wrap.animate-in,
.residential-problems-block.animate-in,
.residential-problem-row.animate-in,
.jungmun-block-wrapper.animate-in,
.mobile-integration-section.animate-in,
.compare-closing-wrap.animate-in,
.compare-intro-block.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 상가/병원/요양원 히어로 - residential-section 내 타이틀만 (비디오 없는 케이스) */
.residential-section.animate-in .residential-hero-title {
    opacity: 1;
    transform: translateY(0);
}

/* 비디오 영역 - 약간의 scale 효과 */
.residential-video-wrap {
    transform: translateY(24px) scale(0.98);
}

.residential-video-wrap.animate-in {
    transform: translateY(0) scale(1);
}

/* 클로징 박스 - 부드러운 scale */
.compare-closing-wrap {
    transform: translateY(20px) scale(0.98);
}

.compare-closing-wrap.animate-in {
    transform: translateY(0) scale(1);
}

/* IoT 섹션 - 스태거드 (자식들) */
.mobile-integration-section.animate-in .situation2-header,
.mobile-integration-section.animate-in .mobile-integration-content,
.mobile-integration-section.animate-in .situation2-representative,
.mobile-integration-section.animate-in .iot-section {
    animation: fadeUpIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mobile-integration-section .situation2-header,
.mobile-integration-section .mobile-integration-content,
.mobile-integration-section .situation2-representative,
.mobile-integration-section .iot-section {
    opacity: 0;
    transform: translateY(20px);
}

.mobile-integration-section.animate-in .situation2-header { animation-delay: 0.05s; }
.mobile-integration-section.animate-in .mobile-integration-content { animation-delay: 0.12s; }
.mobile-integration-section.animate-in .situation2-representative { animation-delay: 0.2s; }
.mobile-integration-section.animate-in .iot-section { animation-delay: 0.28s; }

/* jungmun - 인트로와 캐러셀 스태거드 */
.jungmun-block-wrapper .jungmun-section-intro,
.jungmun-block-wrapper .jungmun-carousel-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.jungmun-block-wrapper.animate-in .jungmun-section-intro {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.08s;
}

.jungmun-block-wrapper.animate-in .jungmun-carousel-section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* sub-nav 인트로 페이드 인 (페이지 로드 시) */
.sub-nav-intro {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

/* 모션 축소 선호 시 애니메이션 생략 */
@media (prefers-reduced-motion: reduce) {
    .residential-hero-title,
    .residential-video-wrap,
    .residential-problems-block,
    .residential-problem-row,
    .jungmun-block-wrapper,
    .mobile-integration-section,
    .compare-closing-wrap,
    .compare-intro-block,
    .residential-problems-block .residential-pain-card,
    .mobile-integration-section .situation2-header,
    .mobile-integration-section .mobile-integration-content,
    .mobile-integration-section .situation2-representative,
    .mobile-integration-section .iot-section,
    .jungmun-block-wrapper .jungmun-section-intro,
    .jungmun-block-wrapper .jungmun-carousel-section,
    .sub-nav-intro {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ========== 다크 배경 (appbar 제외) ========== */
body {
    background: #1e293b;
}

/* ========== Use Case 페이지: 상단바를 바디 색(#1e293b)과 동일하게 ========== */
body.page-use-case .header {
    background: #1e293b !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.page-use-case .header::after {
    opacity: 0;
}

body.page-use-case .header .header-logo a,
body.page-use-case .header .header-nav a,
body.page-use-case .header .header-menu-toggle span {
    color: #e2e8f0 !important;
}

body.page-use-case .header .header-nav a:hover,
body.page-use-case .header .header-logo a:hover {
    color: #a5b4fc !important;
}

body.page-use-case .header .header-nav a.active {
    color: #a5b4fc !important;
}

body.page-use-case .header .header-nav a.btn {
    color: #e2e8f0 !important;
    border-color: rgba(226, 232, 240, 0.5) !important;
}

body.page-use-case .header .header-nav a.btn:hover {
    color: #fff !important;
    border-color: #fff !important;
}

@media (max-width: 768px) {
    body.page-use-case .header-nav {
        background: #1e293b !important;
    }

    body.page-use-case .header-nav a {
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }
}

main {
    background: #1e293b;
}

/* ========== 주거용 섹션 - 새 디자인 ========== */
.residential-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.residential-hero-title {
    font-size: 5.5rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: -0.05em;
    line-height: 1.35;
    margin: 0 0 32px;
    text-align: center;
}

.residential-hero-accent {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: residential-accent-slide-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    opacity: 0;
}

@keyframes residential-accent-slide-in {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 해결 방식 - Apple-style: 심플, 여백, 정제 */
.residential-improvement-section {
    max-width: 1000px;
    margin: 0 auto 120px;
    padding: 0 24px;
}

.residential-improvement-intro {
    text-align: left;
    margin: 0 0 40px;
    line-height: 1.1;
}

.residential-improvement-intro-line1 {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}

.residential-improvement-intro-line2 {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.05em;
}

.residential-improvement-card {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(120px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.residential-improvement-subtitle {
    text-align: center;
    margin: 0 0 40px;
    line-height: 1.2;
}

.residential-improvement-animated-text {
    display: inline-block;
    font-size: 2rem;
    font-weight: 600;
    color: #6ee7b7;
    letter-spacing: -0.03em;
    margin-left: 12px;
    opacity: 0;
    transform: translateX(120px);
    vertical-align: baseline;
    /* 스크롤 진입 시(is-visible) 또는 0.5초 후 페일백으로 항상 표시 */
    animation: slideInFromRight 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.residential-improvement-section.is-visible .residential-improvement-animated-text {
    animation: slideInFromRight 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.residential-improvement-subtitle-line1 {
    display: block;
    font-size: 1.25rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.residential-improvement-subtitle-line2 {
    display: block;
    font-size: 2.25rem;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: -0.04em;
}

.residential-improvement-subtitle .subtitle-emphasis {
    color: #6ee7b7;
}

.residential-improvement-row {
    display: grid;
    grid-template-columns: minmax(260px, 440px) 1fr;
    gap: 32px;
    align-items: center;
}

.residential-improvement-img {
    border-radius: 20px;
    overflow: hidden;
}

.residential-improvement-img img {
    width: 100%;
    height: auto;
    display: block;
}

.residential-improvement-benefits-wrap {
    padding: 0;
}

.residential-improvement-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.residential-improvement-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.residential-improvement-benefits li:last-child {
    margin-bottom: 0;
}

.residential-improvement-benefits .benefit-icon {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-top: 14px;
}

.residential-improvement-benefits .benefit-text {
    flex: 1;
    min-width: 0;
}

.residential-improvement-benefits .benefit-line1 {
    display: block;
    font-size: 1.15rem;
    line-height: 1.5;
    color: #94a3b8;
    font-weight: 400;
}

.residential-improvement-benefits .benefit-emphasis {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-top: 10px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.residential-improvement-disclaimer {
    margin: 12px 0 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .residential-improvement-section {
        padding: 0 16px;
    }

    .residential-improvement-intro {
        margin-bottom: 36px;
    }

    .residential-improvement-intro-line1 {
        font-size: 1.6rem;
    }

    .residential-improvement-intro-line2 {
        font-size: clamp(1.35rem, 7.2vw, 2.5rem);
        white-space: nowrap;
    }

    .residential-improvement-animated-text {
        white-space: nowrap;
        margin-left: 6px;
    }

    .residential-improvement-subtitle {
        margin-bottom: 40px;
    }

    .residential-improvement-subtitle-line1 {
        font-size: 1.15rem;
    }

    .residential-improvement-subtitle-line2 {
        font-size: 1.75rem;
    }

    .residential-improvement-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .residential-improvement-img {
        max-width: 340px;
        margin: 0 auto;
    }

    .residential-improvement-benefits li {
        margin-bottom: 24px;
    }

    .residential-improvement-benefits .benefit-line1 {
        font-size: 1.05rem;
    }

    .residential-improvement-benefits .benefit-emphasis {
        font-size: 1.5rem;
    }
}

/* 문제 섹션 - Apple-style: 심플, 여백, 정제된 톤 */
.residential-problems-block {
    margin-top: 0;
    margin-bottom: 180px;
    padding: 0;
}

.residential-problems-intro {
    text-align: left;
    margin: 0 0 40px;
    line-height: 1.1;
}

.residential-problems-intro-line1 {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}

.residential-problems-intro-line2 {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.05em;
}

.residential-problems-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #f8fafc;
    text-align: center;
    letter-spacing: -0.04em;
    margin: 0 0 40px;
    line-height: 1.2;
}

.residential-problems-title-line1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
}

.residential-problems-title-line2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.residential-pain-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.residential-pain-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    min-width: 0;
    border: none;
    transition: background 0.25s ease;
    container-type: inline-size;
    container-name: pain-card;
}

.residential-pain-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.residential-pain-card-img {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.residential-pain-card-img img {
    width: 100%;
    height: auto;
    display: block;
}

.residential-pain-card p {
    padding: 24px 20px;
    font-size: 0.95rem;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.residential-problem-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
    padding: 0;
    margin: 0;
}

.residential-problem-visual {
    border-radius: 16px;
    overflow: hidden;
}

.residential-problem-visual img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.residential-problem-list h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
    margin: 0 0 8px;
    line-height: 1.5;
}

.residential-problem-list p {
    font-size: 0.9rem;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.residential-problem-list ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.residential-problem-list li {
    position: relative;
    padding-left: 0;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

.residential-problem-list li::before {
    display: none;
}

.residential-problem-note-wrap {
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.residential-problem-note {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.residential-problem-note strong {
    color: #4ade80;
    font-weight: 600;
}

.residential-solution-row {
    text-align: center;
    padding: 48px 24px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 16px;
    margin-bottom: 48px;
}

.residential-solution-lead {
    font-size: 1.125rem;
    color: #94a3b8;
    margin: 0 0 8px;
}

.residential-solution-punch {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    margin: 0;
}

.residential-video-wrap {
    text-align: center;
    margin-bottom: 280px;
}

.residential-video-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 12px;
}

.residential-video-wrap video {
    width: 100%;
    max-width: 960px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.residential-video-caption {
    font-size: 1.35rem;
    font-weight: 600;
    color: #cbd5e1;
    margin: 20px 0 0;
}

@media (max-width: 900px) {
    .residential-pain-cards {
        grid-template-columns: 1fr;
    }

    .residential-problem-row {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px 0 0;
    }

    .residential-problem-visual {
        order: 1;
    }

    .residential-problem-list {
        order: 2;
    }

    .residential-problem-list h3 {
        font-size: 1.15rem;
    }

    .residential-problem-note-wrap {
        padding-top: 16px;
    }
}

@media (max-width: 768px) {
    .residential-section {
        padding: 0 16px 64px;
    }

    .residential-video-wrap {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
        margin-bottom: 220px;
    }

    .residential-video-wrap video {
        max-width: 100%;
        border-radius: 8px;
    }

    .apartment-section .jungmun-carousel-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .category-section[data-category="1"] .jungmun-carousel-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .jungmun-block-wrapper {
        padding: 0 16px;
    }

    .jungmun-section-intro {
        margin-bottom: 32px;
        padding: 0 16px;
    }

    .jungmun-section-intro-line1 {
        font-size: 1.6rem;
    }

    .jungmun-section-intro-line2 {
        font-size: 2.2rem;
    }

    .jungmun-section-caption {
        padding: 0 16px;
    }

    .residential-hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        white-space: nowrap; /* 첫 줄이 모바일에서 아래로 내려가지 않게 고정 */
        line-height: 1.25;
        margin-bottom: 40px;
    }

    .residential-problems-block {
        margin-bottom: 140px;
    }

    .residential-improvement-section {
        margin-bottom: 96px;
    }

    .jungmun-section-intro {
        margin-top: 96px;
    }

    .jungmun-block-wrapper + .jungmun-block-wrapper {
        margin-top: 80px;
    }

    .residential-problems-intro {
        margin-bottom: 36px;
    }

    .residential-problems-intro-line1 {
        font-size: 1.6rem;
    }

    .residential-problems-intro-line2 {
        font-size: 2.5rem;
    }

    .residential-problems-title {
        font-size: 1.4rem;
        margin-bottom: 40px;
        text-align: left;
    }

    .residential-problems-title-line1 {
        display: inline;
        font-size: inherit;
    }

    .residential-problems-title-line2 {
        display: inline;
        font-size: inherit;
    }

    .residential-problems-title {
        white-space: nowrap;
        font-size: clamp(0.95rem, 3.8vw, 1.3rem);
    }

    .residential-pain-cards {
        gap: 20px;
        margin-bottom: 40px;
    }

    .residential-solution-row {
        padding: 36px 20px;
    }

    .residential-solution-punch {
        font-size: 1.5rem;
    }

    .category-section[data-category="2"] .residential-problems-block {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* 병원: 주거용과 동일 - problems→improvement 96px (모바일) */
    .category-section[data-category="2"] .residential-improvement-section {
        margin-top: 0;
    }

    .category-section[data-category="3"] .residential-problems-block {
        padding-left: 16px;
        padding-right: 16px;
    }
    /* 요양원: 주거용과 동일 - problems→improvement 96px (모바일) */
    .category-section[data-category="3"] .residential-improvement-section {
        margin-top: 0;
    }

    .category-section[data-category="3"] .residential-improvement-img {
        max-width: 420px;
    }

    .category-section[data-category="1"] .residential-section {
        padding-bottom: 96px;
    }
    .category-section[data-category="2"] .residential-section,
    .category-section[data-category="3"] .residential-section {
        padding-bottom: 96px;
    }
    /* 요양원: 주거용과 동일 - improvement→jungmun 96px (모바일) */
    .category-section[data-category="3"] .residential-improvement-section + .jungmun-block-wrapper {
        margin-top: 96px;
    }
}

/* 병원 섹션 - 주거용과 동일한 너비(1000px) */
.category-section[data-category="2"] .residential-section {
    padding-bottom: 120px;
}

.category-section[data-category="2"] .residential-problems-block {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* 병원: 주거용과 동일 - problems→improvement 120px (problems margin-bottom) */
.category-section[data-category="2"] .residential-improvement-section {
    margin-top: 0;
}

/* 병원 - 제로원 적용 사진 (disclaimer 아래) */
.hospital-use-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.hospital-use-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.hospital-use-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.hospital-use-caption {
    margin-top: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: -0.02em;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 768px) {
    .hospital-use-images {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 28px;
    }

    .hospital-use-caption {
        margin-top: 12px;
        font-size: 1rem;
    }
}

/* 요양원 섹션 - 주거용과 동일한 너비(1000px) */
.category-section[data-category="3"] .residential-section {
    padding-bottom: 120px;
}

.category-section[data-category="3"] .residential-problems-block {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* 요양원: 주거용과 동일 - improvement→jungmun 160px */
.category-section[data-category="3"] .residential-improvement-section + .jungmun-block-wrapper {
    margin-top: 160px;
}

/* 요양원 해결방법 적용 사진 - 두 이미지 크기·정렬 동일하게 */
.category-section[data-category="3"] .hospital-use-img-wrap {
    aspect-ratio: 4 / 3;
}

.category-section[data-category="3"] .hospital-use-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 요양원 pain 카드 - 두 이미지 크기 동일하게 */
.category-section[data-category="3"] .residential-pain-card-img {
    aspect-ratio: 4 / 3;
}

.category-section[data-category="3"] .residential-pain-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 요양원: 주거용과 동일 - problems→improvement 120px */
.category-section[data-category="3"] .residential-improvement-section {
    margin-top: 0;
}

.category-section[data-category="3"] .residential-improvement-row {
    grid-template-columns: minmax(360px, 520px) 1fr;
}

/* 병원·요양원 - 섹션 배경 제거 (situation3-before/after, situation5-risk-item) */
.category-section[data-category="2"] .situation3-before {
    background: transparent;
    border-color: rgba(254, 202, 202, 0.3);
}

.category-section[data-category="2"] .situation3-before .situation3-panel-title,
.category-section[data-category="2"] .situation3-before .situation3-bullets li {
    color: #fecaca;
}

.category-section[data-category="2"] .situation3-after {
    background: transparent;
    border-color: rgba(134, 239, 172, 0.3);
}

.category-section[data-category="2"] .situation3-after .situation3-panel-title,
.category-section[data-category="2"] .situation3-after .situation3-bullets-2 li {
    color: #bbf7d0;
}

.category-section[data-category="3"] .situation5-risk-item {
    background: transparent;
    border-color: rgba(253, 186, 116, 0.3);
}

.category-section[data-category="3"] .situation5-risk-item:hover {
    background: transparent;
}

.category-section[data-category="3"] .situation5-risk-item p,
.category-section[data-category="3"] .situation5-risks-title {
    color: #cbd5e1;
}

/* 카테고리 섹션 (상가/매장 등) - 다크 배경용 텍스트 */
.category-section .situation-title {
    color: #f1f5f9;
}

.category-section .situation-subtitle {
    color: #cbd5e1;
}

.category-section .situation-desc {
    color: #94a3b8;
}

/* 주거용 내 situation2 등 - 다크 배경용 텍스트 */
.apartment-section .situation-title {
    color: #f1f5f9;
}

.apartment-section .situation-subtitle {
    color: #cbd5e1;
}

.apartment-section .situation-desc {
    color: #94a3b8;
}

.apartment-section .situation-desc strong {
    color: #a5b4fc;
}

/* 상가/매장 기준 배지 */
.situation-category-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 8px 18px;
    border-radius: 24px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* 상가/매장: 문제 제기 → 개선 방식 간격 */
.compare-solution-block {
    margin-top: 180px;
}

@media (max-width: 768px) {
    .compare-solution-block {
        margin-top: 140px;
    }
}

/* 상가/매장 compare-section 인트로 (일단은 차이점부터) - compare-section과 동일 정렬 */
.compare-intro-block {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 0 16px;
    text-align: left;
    box-sizing: border-box;
}

.compare-intro-block .residential-problems-intro {
    margin-bottom: 0;
    text-align: left;
}

/* 비교 섹션 마지막 멘트 - 가로 꽉 채움 + 프로 이미지 (전체 클릭 시 알아보기로 이동) */
.compare-closing-wrap {
    display: flex;
    width: 100%;
    margin-top: 96px;
    padding: 32px 32px 28px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #334155 0%, #3d4a5f 50%, #2d3748 100%);
    border-radius: 16px;
    border: 1px solid #475569;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    gap: 40px;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.compare-closing-wrap:hover {
    background: linear-gradient(135deg, #3d4a5f 0%, #475569 50%, #334155 100%);
    border-color: #64748b;
}

.compare-closing-product {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 요양원(Mini) 제품 이미지 더 크게 */
.category-section[data-category="3"] .compare-closing-product {
    width: 120px;
    height: 120px;
}

.compare-closing-product::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.compare-closing-product img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.compare-closing-text {
    text-align: center;
}

.compare-closing-message .mobile-br {
    display: none;
}

.compare-closing-message {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
    line-height: 1.4;
}

.compare-closing-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: #a5b4fc;
}

.compare-closing-wrap:hover .compare-closing-link {
    color: #c4b5fd;
}

.compare-closing-message .compare-closing-accent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ========== 섹션 타이틀 위 - 빛나는 실선 (situation-header-unified만) ========== */
.residential-hero-title,
.situation-header-unified {
    position: relative;
    padding-top: 24px;
}

/* residential-hero-title에는 그라데이션 실선 없음 (주거용·상가/매장) */
.situation-header-unified::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #8b9aff, #667eea, transparent);
    border-radius: 0 0 2px 2px;
}

/* situation2-section 상단 라인 제거 (situation-header-unified에 통합) */
.situation2-section::before {
    display: none;
}

/* jungmun - 인트로·캐러셀·캡션을 같은 너비로 묶음 */
.jungmun-block-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.jungmun-block-wrapper + .jungmun-block-wrapper {
    margin-top: 120px;
}

.jungmun-block-wrapper .jungmun-section-intro {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.jungmun-block-wrapper .jungmun-carousel-section {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.jungmun-block-wrapper .jungmun-section-caption {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* 상가/매장 - 히어로↔차이점 구간 간격 */
.category-section[data-category="1"] .residential-section {
    padding-bottom: 120px;
}

/* jungmun - 주변(residential-section)과 동일한 가로 너비 */
.jungmun-section-intro {
    max-width: 1000px;
    margin: 160px auto 48px;
    padding: 0 24px;
    line-height: 1.1;
}

.jungmun-section-intro-line1 {
    display: block;
    font-size: 2rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}

.jungmun-section-intro-line2 {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.05em;
}

.jungmun-section-caption {
    max-width: 1000px;
    margin: 4px auto 80px;
    padding: 0 24px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #94a3b8;
    text-align: left;
}

.apartment-section .jungmun-carousel-section {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    padding-left: 24px;
    padding-right: 24px;
}

.apartment-section .jungmun-carousel-section .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.apartment-section .jungmun-carousel-section .jungmun-layout-wrapper {
    max-width: 100%;
}

.apartment-section .jungmun-carousel-section .jungmun-marquee-wrapper {
    margin-left: 0;
    padding-left: 0;
}
.apartment-section .jungmun-carousel-section.jungmun-section-reverse .jungmun-marquee-wrapper {
    margin-right: 0;
    padding-right: 0;
}

/* 주거용 중문 캐러셀: 이미지 잘림 방지(전체 노출) */
#jungmunCarouselTrackUseCase,
#jungmunCarouselTrackStore,
#jungmunCarouselTrackHospital {
    animation: none !important;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

#jungmunCarouselTrackUseCase .jungmun-slide img {
    object-fit: contain !important;
    object-position: center center;
    width: 100%;
    height: 300px !important;
    background: #ffffff;
}

#jungmunCarouselTrackStore .jungmun-slide img {
    object-fit: contain !important;
    object-position: center center;
    width: 100%;
    height: 300px !important;
    background: #ffffff;
}

#jungmunCarouselTrackHospital .jungmun-slide img {
    object-fit: contain !important;
    object-position: center center;
    width: 100%;
    height: 300px !important;
    background: #ffffff;
}

/* use_case 중문 텍스트 오버레이 박스도 축소 */
.apartment-section .jungmun-text-box {
    padding: 22px 28px;
    min-width: 230px;
    height: 190px;
}

.apartment-section .jungmun-text-line1 {
    font-size: 0.95rem;
    margin-top: 52px;
}

.apartment-section .jungmun-text-line2 {
    font-size: 1.3rem;
    margin-bottom: 96px;
}

@media (max-width: 768px) {
    .apartment-section .jungmun-text-box {
        height: 150px !important;
        min-width: 210px;
        padding: 14px 18px;
    }

    .apartment-section .jungmun-text-line1 {
        margin-top: 40px;
    }

    .apartment-section .jungmun-text-line2 {
        margin-bottom: 72px;
    }

    #jungmunCarouselTrackUseCase .jungmun-slide img {
        height: 260px !important;
    }
    #jungmunCarouselTrackStore .jungmun-slide img {
        height: 260px !important;
    }
    #jungmunCarouselTrackHospital .jungmun-slide img {
        height: 260px !important;
    }
}

/* 상가/매장 섹션 - 중문 시스템 (주거용과 동일 구조) */
.category-section[data-category="1"] .jungmun-carousel-section {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    padding-left: 24px;
    padding-right: 24px;
}
.category-section[data-category="1"] .jungmun-carousel-section .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.category-section[data-category="1"] .jungmun-carousel-section .jungmun-layout-wrapper {
    max-width: 100%;
}
.category-section[data-category="1"] .jungmun-carousel-section .jungmun-marquee-wrapper {
    margin-left: 0;
    padding-left: 0;
}
.category-section[data-category="1"] .jungmun-carousel-section.jungmun-section-reverse .jungmun-marquee-wrapper {
    margin-right: 0;
    padding-right: 0;
}

/* situation2 + mobile-integration 합쳐진 섹션 - 자연스러운 연결 */
.apartment-section .situation2-section.mobile-integration-section {
    padding: 48px 40px 80px;
}

.jungmun-block-wrapper .situation2-section.mobile-integration-section {
    padding-left: 0;
    padding-right: 0;
}

.jungmun-block-wrapper .mobile-integration-container {
    max-width: 100%;
}

.jungmun-block-wrapper .iot-section {
    padding-left: 0;
    padding-right: 0;
}

.apartment-section .situation2-section.mobile-integration-section .situation2-header {
    margin-bottom: 40px;
}

.apartment-section .mobile-integration-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apartment-section .mobile-integration-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.apartment-section .mobile-integration-title {
    text-align: center;
}

.situation2-representative {
    margin: 32px 0 40px;
    text-align: center;
}

.situation2-representative img {
    max-width: 100%;
    width: 100%;
    max-width: 560px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

/* IoT 섹션 - mobile-integration과 동일한 색상 (한 판) */
.apartment-section .iot-section {
    background: transparent;
    padding: 48px 40px 80px 40px;
}

.apartment-section .iot-block-wrapper {
    margin-top: 60px;
}

.apartment-section .iot-text p {
    background: linear-gradient(135deg, #667eea 0%, #c1caff 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apartment-section .iot-text .iot-text-sub {
    margin-top: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #cbd5e1;
    background: none;
    -webkit-text-fill-color: currentColor;
}

/* 첫 번째 IoT 행도 사진 기준 세로 중앙 정렬 */
.apartment-section .iot-grid {
    align-items: center;
}

/* IoT 추가 행: 사진 왼쪽, 텍스트 오른쪽 */
.apartment-section .iot-grid.iot-grid-reverse .iot-image-wrapper {
    justify-content: flex-start;
}

.apartment-section .iot-grid.iot-grid-reverse {
    align-items: center;
}

.apartment-section .iot-grid.iot-grid-reverse .iot-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

.apartment-section .iot-text.iot-text-right {
    text-align: right;
    align-items: flex-end;
}

.apartment-section .iot-grid.iot-grid-reverse .iot-text.iot-text-right {
    text-align: right !important;
    align-items: flex-end !important;
}

.apartment-section .iot-grid.iot-grid-reverse .iot-text .iot-text-sub {
    margin-top: 10px;
}

.apartment-section .iot-features p.white {
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .apartment-section .iot-section-mobile {
        background: transparent;
        padding: 0 20px 40px;
        margin-top: 0;
    }

    /* 모바일도 데스크 느낌: 텍스트/이미지 2열 유지 */
    .apartment-section .iot-grid-mobile {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        align-items: center;
        margin-bottom: 20px;
    }

    .apartment-section .iot-text-mobile {
        text-align: left;
    }

    .apartment-section .iot-image-wrapper-mobile {
        justify-content: flex-end;
    }

    .apartment-section .iot-image-wrapper-mobile img {
        width: 100%;
        max-width: 180px;
        min-width: 0;
    }

    .apartment-section .iot-text-mobile .iot-text-sub {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .apartment-section .iot-grid-mobile-reverse .iot-image-wrapper-mobile {
        justify-content: flex-start;
    }

    .apartment-section .iot-grid-mobile-reverse .iot-text-mobile-right {
        text-align: right;
        justify-content: flex-end;
    }

    .apartment-section .iot-block-wrapper-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .apartment-section .iot-block-wrapper-mobile img {
        width: 100%;
        max-width: 420px;
        min-width: 300px;
        margin: 0 auto;
    }
}

.apartment-section .iot-features p.gradient {
    background: linear-gradient(135deg, #667eea 0%, #c1caff 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apartment-section .iot-bottom-text p {
    color: #cbd5e1;
}

.iot-app-download {
    text-align: center;
    padding: 32px 20px 0;
}

.iot-app-download .app-download-buttons {
    justify-content: center;
}

/* IoT 모바일 - 동일 색상 */
.apartment-section .iot-text-mobile p {
    background: linear-gradient(135deg, #667eea 0%, #c1caff 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apartment-section .iot-text-mobile .iot-text-sub {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #cbd5e1;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.apartment-section .iot-grid-mobile-reverse {
    margin-top: 16px;
}

.apartment-section .iot-text-mobile-right {
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.apartment-section .iot-features-mobile p.white {
    color: #e2e8f0;
}

.apartment-section .iot-features-mobile p.gradient {
    background: linear-gradient(135deg, #667eea 0%, #c1caff 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apartment-section .iot-bottom-text-mobile p {
    color: #cbd5e1;
}

/* situation3 헤더 폰트 크기 */
.situation3-header .situation-title {
    font-size: 2.5rem;
}

.situation3-header .situation-subtitle {
    font-size: 1.5rem;
}

/* 의도 강조 */
.situation3-header .situation-subtitle-accent {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 적외선 vs 제로원 비교 섹션 ========== */
@keyframes compareCardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.compare-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 16px 56px;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* VS 배지 - 중앙 */
.compare-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.compare-vs-text {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 12px rgba(102, 126, 234, 0.35);
    line-height: 1;
}

.compare-vs-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

/* 비교 카드 공통 */
.compare-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 24px;
    border-radius: 20px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
    animation: compareCardIn 0.6s ease-out backwards;
    min-width: 0;
    overflow: hidden;
}

.compare-card--competitor { animation-delay: 0.1s; }
.compare-card--zeroone { animation-delay: 0.25s; }

/* 타사 제품 카드 - 전체 톤 통일 (다크 슬레이트) */
.compare-card--competitor {
    background: #334155;
    border: 1px solid #475569;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.compare-card--competitor:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

/* 제로원 카드 - 동일 톤 + 보라 악센트 */
.compare-card--zeroone {
    background: #334155;
    border: 1px solid rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.compare-card--zeroone:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.15);
}

/* 카드 헤더 */
.compare-card-header {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.compare-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: -0.02em;
}

.compare-badge--competitor {
    background: #475569;
    color: #cbd5e1;
}

.compare-badge--zeroone {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.compare-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
}

.compare-card--competitor .compare-card-title {
    color: #94a3b8;
}

.compare-card--zeroone .compare-card-title {
    color: #f1f5f9;
}

/* 제품 이미지 + 이름 같은 줄 - 좌우 카드 동일 정렬 */
.compare-product-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 0 18px;
    min-height: 96px;
}

.compare-product-img {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* 적외선: 제로원 프로 이미지(168px)보다 작아서, 같은 선상 맞추기 위해 아래로 내림 */
.compare-card--competitor .compare-product-row {
    margin-top: 36px;
}

.compare-card--competitor .compare-product-img {
    background: transparent;
}

/* 제로원: 이미지 더 크게, 박스 없음, 적외선과 동일 선상 맞추기 위해 살짝 위로 */
.compare-card--zeroone .compare-product-row {
    margin-top: -12px;
    min-height: 168px;
}

.compare-card--zeroone .compare-product-img {
    width: 168px;
    height: 168px;
    background: transparent;
}

.compare-product-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.compare-card--competitor .compare-product-img img {
    filter: saturate(0.7) contrast(0.95);
}

.compare-product-row .compare-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

/* 상황 아이템들 */
.compare-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* 적외선: 제로원 제품 이미지가 더 커서, 박스 시작점 맞추기 위해 위쪽 여백 추가 */
.compare-card--competitor .compare-items {
    margin-top: 24px;
}

.compare-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.compare-item-img {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
    aspect-ratio: 4/3;
}

.compare-item-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* 타사: 흐릿·탈색 */
.compare-item-img--muted {
    background: #1e293b;
}

.compare-item-img--muted img {
    filter: saturate(0.5) brightness(0.9);
}

/* 제로원: 선명 */
.compare-item-img--vivid {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.1);
}

.compare-item-img--vivid img {
    filter: saturate(1.02) brightness(1.02);
}

/* 어린아이 이미지 - 원본 크기 */
.compare-item-img--original {
    aspect-ratio: auto;
}

.compare-item-img--original img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* 아이콘 배지 (이미지 우상단) */
.compare-item-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
}

.compare-item-icon--bad {
    background: #64748b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.compare-item-icon--good {
    background: rgba(102, 126, 234, 0.9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 캡션 - 중요 메시지 강조 + 애니메이션 */
@keyframes captionReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes captionHighlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(102, 126, 234, 0); }
}

@keyframes captionHighlightBad {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100, 116, 139, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(100, 116, 139, 0); }
}

.compare-item-caption {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    padding: 10px 14px;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: keep-all;
    border-radius: 10px;
    animation: captionReveal 0.5s ease-out backwards;
}

.compare-item:nth-child(1) .compare-item-caption { animation-delay: 0.15s, 0.75s; }
.compare-item:nth-child(2) .compare-item-caption { animation-delay: 0.3s, 1.05s; }

.compare-card--competitor .compare-item-caption {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: captionReveal 0.5s ease-out backwards, captionHighlightBad 2s ease-out 0.6s 2;
}

.compare-card--zeroone .compare-item-caption {
    color: #f1f5f9;
    background: rgba(51, 65, 85, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.3);
    animation: captionReveal 0.5s ease-out backwards, captionHighlight 2s ease-out 0.6s 2;
}

/* 태블릿/모바일 - 3열이 좁으면 1열로 전환 */
@media (max-width: 900px) {
    /* 상가/매장 모바일 비교 섹션: 세로 간격 강제 압축 */
    .category-section[data-category="1"] .compare-section {
        gap: 2px !important;
        padding: 8px 0 10px !important;
    }

    .category-section[data-category="1"] .compare-card {
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .category-section[data-category="1"] .compare-vs {
        padding: 0 !important;
        min-height: 20px !important;
        margin: 0 !important;
    }

    .category-section[data-category="1"] .compare-vs-text {
        font-size: 1.45rem !important;
        line-height: 1 !important;
    }

    .category-section[data-category="1"] .compare-vs-sub {
        margin-top: 0 !important;
        font-size: 0.78rem !important;
        line-height: 1 !important;
    }

    .category-section[data-category="1"] .compare-product-row {
        min-height: 0 !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }

    .category-section[data-category="1"] .compare-product-img {
        width: 44px !important;
        height: 44px !important;
    }

    .category-section[data-category="1"] .compare-card--zeroone .compare-product-img {
        width: 70px !important;
        height: 70px !important;
    }

    .category-section[data-category="1"] .compare-card--zeroone .compare-product-row {
        min-height: 0 !important;
        margin-top: 0 !important;
    }

    .category-section[data-category="1"] .compare-card--competitor .compare-items {
        margin-top: 4px !important;
    }

    .category-section[data-category="1"] .compare-card--zeroone .compare-items {
        margin-top: 4px !important;
    }

    .category-section[data-category="1"] .compare-items {
        gap: 8px !important;
    }

    .compare-closing-wrap {
        margin-top: 64px;
        padding: 28px 24px;
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .compare-closing-product {
        width: 72px;
        height: 72px;
    }

    .category-section[data-category="3"] .compare-closing-product {
        width: 96px;
        height: 96px;
    }

    .compare-closing-text {
        text-align: center;
    }

    .compare-closing-message {
        font-size: 1.1rem;
        text-align: center;
    }

    .compare-closing-message .mobile-br {
        display: block;
    }

    .compare-closing-link {
        display: block;
        text-align: center;
    }

    /* 상가/매장: 비교 카드 최대한 넓게 */
    .category-section[data-category="1"] .situation3-section {
        padding-left: 0;
        padding-right: 0;
        max-width: none;
    }

    .category-section[data-category="1"] .situation3-header {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* 상가/매장: compare-intro-block과 카드 동일선상 (카드 padding 12px) */
    .category-section[data-category="1"] .compare-intro-block {
        padding-left: 12px;
        padding-right: 12px;
    }

    .situation3-header .situation-title {
        font-size: 1.9rem;
    }

    .situation3-header .situation-subtitle {
        font-size: 1.2rem;
    }

    .category-section[data-category="1"] .compare-card {
        padding: 24px 12px;
    }

    .compare-section {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
        padding: 20px 0 28px;
        max-width: none;
        width: 100%;
    }

    .compare-vs {
        padding: 4px 0;
        order: 1;
        min-height: 34px;
    }

    .compare-vs-text {
        font-size: 1.6rem;
    }

    .compare-card--competitor {
        order: 0;
    }

    .compare-card {
        padding: 14px 14px;
    }

    .compare-card--zeroone {
        order: 2;
    }

    .compare-product-row {
        min-height: 56px;
    }

    .compare-product-img {
        width: 64px;
        height: 64px;
    }

    .compare-card--zeroone .compare-product-img {
        width: 110px;
        height: 110px;
    }

    .compare-card--competitor .compare-product-row {
        margin-top: 12px;
    }

    .compare-card--zeroone .compare-product-row {
        margin-top: -4px;
        min-height: 110px;
    }

    .compare-card--competitor .compare-items {
        margin-top: 10px;
    }

    .compare-item-img img {
        max-width: 100%;
    }
}

/* ========== 서브 네비게이션 개선 (클릭 가능함이 눈에 들어오도록) ========== */
.sub-navigation-section {
    background: #1e293b;
    padding: 28px 0 24px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 스크롤 아래로: 숨김 / 스크롤 위로: 표시 */
.sub-navigation-section.sub-nav-scroll-hidden {
    transform: translateY(-100%);
}

.sub-nav-intro {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #94a3b8;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.sub-nav-tabs {
    background: #334155 !important;
    border-radius: 16px !important;
    padding: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #475569 !important;
}

.sub-nav-tab {
    padding: 14px 28px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
    border: none !important;
    border-right: none !important;
    color: #94a3b8 !important;
    background: transparent !important;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sub-nav-tab:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #a5b4fc !important;
}

.sub-nav-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.sub-navigation-section.is-sticky .sub-nav-tabs {
    background: #334155 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

.sub-navigation-section.is-sticky .sub-nav-tab {
    color: #94a3b8 !important;
    border-right-color: transparent !important;
}

.sub-navigation-section.is-sticky .sub-nav-tab:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #a5b4fc !important;
}

.sub-navigation-section.is-sticky .sub-nav-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
}

/* ========== CTA 문의하기 섹션 ========== */
.use-case-cta.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}

.use-case-cta .cta-content {
    max-width: 560px;
    margin: 0 auto;
}

.use-case-cta .cta-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.use-case-cta .cta-description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 28px;
}

.use-case-cta .hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    opacity: 1;
    margin-top: 0;
}

.use-case-cta .btn-arrow {
    margin-left: 4px;
}

.use-case-cta .btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* 문의하기 팝업 */
.inquiry-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.inquiry-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.inquiry-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.inquiry-modal-popup {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 24px;
}

.inquiry-modal-title {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
}

.inquiry-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.inquiry-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.inquiry-modal-btn:hover {
    opacity: 0.9;
}

.inquiry-modal-btn-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.inquiry-modal-btn--kakao {
    background: #fee500;
    color: #191919;
    border: 1px solid #e5d800;
}

.inquiry-modal-btn--naver {
    background: #03c75a;
    color: #fff;
    border: 1px solid #02b351;
}

.inquiry-modal-btn--phone {
    background: #f1f5f9;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
}

.inquiry-modal-btn--phone .inquiry-modal-btn-icon {
    width: auto;
    height: auto;
    font-size: 1.1rem;
}

.inquiry-modal-btn--email {
    background: #f1f5f9;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
}

.inquiry-modal-btn--email .inquiry-modal-btn-icon {
    width: auto;
    height: auto;
    font-size: 1.1rem;
}

.inquiry-modal-close {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.inquiry-modal-close:hover {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .sub-nav-intro {
        font-size: 0.875rem;
        margin-bottom: 12px;
        padding: 0 16px;
    }

    .sub-nav-tabs {
        border-radius: 14px !important;
        padding: 5px !important;
    }

    .sub-nav-tab {
        padding: 10px 8px !important;
        font-size: clamp(12px, 2.8vw, 14px) !important;
    }

    .sub-nav-tab.active {
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    }

    /* 모바일 상가/매장 비교: 세로 간격 최종 강제 축소 */
    .category-section[data-category="1"] .compare-section {
        gap: 6px !important;
        grid-template-rows: auto auto auto !important;
        padding-top: 4px !important;
        padding-bottom: 8px !important;
    }

    .category-section[data-category="1"] .compare-card {
        margin: 0 !important;
    }

    .category-section[data-category="1"] .compare-vs {
        margin: 4px 0 !important;
    }

    /* 모바일: 상단 통합 박스 좌우 패딩 축소 */
    .apartment-section .jungmun-block-wrapper {
        padding: 0 10px !important;
    }

    .apartment-section .situation2-section.mobile-integration-section {
        padding: 24px 8px 40px !important;
    }

    .apartment-section .situation2-section.mobile-integration-section .mobile-integration-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .apartment-section .situation2-section.mobile-integration-section .situation2-header {
        margin-bottom: 16px !important;
    }

    /* IoT 모바일 정렬 최종 고정 */
    .apartment-section .iot-section-mobile {
        padding: 0 16px 32px !important;
    }

    .apartment-section .iot-grid-mobile {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        align-items: center !important;
        margin: 12px 0 24px !important;
    }

    .apartment-section .iot-grid-mobile-reverse {
        margin-top: 8px !important;
        margin-bottom: 24px !important;
    }

    .apartment-section .iot-text-mobile {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: left !important;
    }

    .apartment-section .iot-grid-mobile .iot-text-mobile > p:first-child {
        font-size: clamp(0.98rem, 4.1vw, 1.18rem) !important;
        line-height: 1.3 !important;
        word-break: keep-all;
    }

    .apartment-section .iot-text-mobile-right {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: right !important;
        align-items: flex-end !important;
    }

    .apartment-section .iot-image-wrapper-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    .apartment-section .iot-grid-mobile-reverse .iot-image-wrapper-mobile {
        justify-content: flex-start !important;
    }

    .apartment-section .iot-image-wrapper-mobile img {
        width: 100% !important;
        max-width: 150px !important;
        height: auto !important;
    }

    .apartment-section .iot-text-mobile .iot-text-sub {
        margin-top: 8px !important;
        font-size: clamp(0.72rem, 2.9vw, 0.82rem) !important;
        line-height: 1.35 !important;
        word-break: keep-all !important;
    }

    .apartment-section .iot-bottom-text .iot-bottom-line-nowrap {
        white-space: nowrap;
        font-size: clamp(0.92rem, 3.7vw, 1.02rem);
    }

    .apartment-section .iot-bottom-text-mobile {
        margin-top: 8px !important;
    }

    .apartment-section .iot-bottom-text-mobile p {
        font-size: clamp(0.9rem, 3.4vw, 1.02rem) !important;
        line-height: 1.35 !important;
        word-break: keep-all !important;
        text-align: center;
    }

    .apartment-section .iot-bottom-text-mobile p.iot-bottom-text-mobile-large {
        font-size: clamp(1.2rem, 5.2vw, 1.5rem) !important;
        line-height: 1.3 !important;
    }
}
