/**
 * 화장실방수 페이지 스타일
 * 근영방수 - bathroom.css
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* Colors */
    --color-primary: #0047AB;
    --color-primary-dark: #003580;
    --color-primary-light: #E8F0FE;
    --color-accent: #FFD100;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-bg: #ffffff;
    --color-bg-gray: #f8f9fa;
    --color-border: #e0e0e0;
    
    /* Target Colors */
    --color-direct: #0047AB;
    --color-business: #6B46C1;
    
    /* Typography */
    --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-width: 1200px;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Target-specific theming */
[data-target="direct"] {
    --color-theme: var(--color-direct);
}

[data-target="business"] {
    --color-theme: var(--color-business);
}

/* ========================================
   Reset & Base
======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ========================================
   Layout
======================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ========================================
   Section Header
======================================== */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--color-text-light);
}

/* ========================================
   SECTION 1: HERO
======================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    background: var(--color-text);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: calc(100% - 100px);
    overflow: hidden;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.5) 100%
    );
}

.slide-content {
    position: absolute;
    bottom: 120px;
    left: 0;
    width: 100%;
    padding: 0 40px;
    color: #fff;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Hero Controls */
.hero-controls {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 10;
}

.hero-prev,
.hero-next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255,255,255,0.3);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hero-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Hero Stats */
.hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    border-top: 1px solid var(--color-border);
}

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

.stat-number {
    font-size: 36px;
    font-weight: 900;
    color: var(--color-theme, var(--color-primary));
}

.stat-suffix {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-theme, var(--color-primary));
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ========================================
   SECTION 2: PROBLEM
======================================== */
.problem-section {
    padding: var(--section-padding);
    background: var(--color-bg-gray);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.problem-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.problem-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.problem-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.problem-card:hover .problem-image img {
    transform: scale(1.05);
}

.problem-text {
    padding: 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
}

/* ========================================
   SECTION 3: SOLUTION
======================================== */
.solution-section {
    padding: var(--section-padding);
}

.solution-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-light);
    background: var(--color-bg-gray);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--color-theme, var(--color-primary));
    background: var(--color-primary-light);
}

.tab-btn.active {
    color: #fff;
    background: var(--color-theme, var(--color-primary));
}

.tab-icon {
    width: 20px;
    height: 20px;
}

/* Solution Content */
.solution-content {
    display: none;
}

.solution-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.solution-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.solution-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.solution-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.solution-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.solution-desc {
    font-size: 18px;
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 24px;
}

.solution-fits {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.solution-fits li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--color-text);
}

.solution-fits li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--color-theme, var(--color-primary));
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* ========================================
   SECTION 4: PROCESS
======================================== */
.process-section {
    padding: var(--section-padding);
    background: var(--color-bg-gray);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.process-step {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.process-step:hover {
    transform: translateY(-4px);
}

.process-step.highlight {
    box-shadow: 0 0 0 3px var(--color-theme, var(--color-primary)), var(--shadow-md);
}

.step-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-info {
    padding: 20px;
    text-align: center;
    position: relative;
}

.step-number {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-theme, var(--color-primary));
    margin-bottom: 6px;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}

.step-desc {
    font-size: 13px;
    color: var(--color-text-light);
}

.step-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--color-theme, var(--color-primary));
    border-radius: 20px;
}

/* Process Keypoint */
.process-keypoint {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-theme, var(--color-primary));
}

.keypoint-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.keypoint-icon svg {
    width: 100%;
    height: 100%;
    color: var(--color-theme, var(--color-primary));
}

.keypoint-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
}

.keypoint-text strong {
    font-size: 18px;
    color: var(--color-theme, var(--color-primary));
}

/* ========================================
   SECTION 5: PORTFOLIO
======================================== */
.portfolio-section {
    padding: var(--section-padding);
}

.portfolio-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-slides {
    overflow: hidden;
}

.portfolio-slide {
    display: none;
}

.portfolio-slide.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.ba-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.ba-before,
.ba-after {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ba-before img,
.ba-after img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.ba-label {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
}

.ba-after .ba-label {
    background: var(--color-theme, var(--color-primary));
}

.portfolio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.portfolio-location {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.portfolio-work {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Portfolio Controls */
.portfolio-prev,
.portfolio-next {
    position: absolute;
    top: 50%;
    transform: translateY(-100%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all var(--transition-fast);
    z-index: 10;
}

.portfolio-prev {
    left: -24px;
}

.portfolio-next {
    right: -24px;
}

.portfolio-prev:hover,
.portfolio-next:hover {
    background: var(--color-theme, var(--color-primary));
    color: #fff;
}

.portfolio-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.portfolio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.portfolio-dot.active {
    background: var(--color-theme, var(--color-primary));
    transform: scale(1.2);
}

/* ========================================
   SECTION 6: CTA
======================================== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--color-theme, var(--color-primary)) 0%, var(--color-primary-dark) 100%);
}

.cta-content {
    text-align: center;
    color: #fff;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.cta-btn-primary {
    background: #fff;
    color: var(--color-theme, var(--color-primary));
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.cta-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.cta-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.cta-icon {
    width: 22px;
    height: 22px;
}

.cta-notice {
    font-size: 14px;
    opacity: 0.8;
}

/* ========================================
   Responsive Design
======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 40px;
    }
    
    .hero-stats {
        gap: 48px;
    }
    
    .stat-number {
        font-size: 30px;
    }
    
    .problem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .solution-layout {
        gap: 32px;
    }
    
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-prev {
        left: 16px;
    }
    
    .portfolio-next {
        right: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .hero-section {
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    .hero-slider {
        height: 70vh;
        min-height: 400px;
    }
    
    .slide-content {
        bottom: 80px;
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        position: relative;
        height: auto;
        padding: 24px;
        gap: 24px;
        flex-wrap: wrap;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .solution-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        justify-content: center;
        padding: 14px 24px;
    }
    
    .solution-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .solution-name {
        font-size: 24px;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .process-keypoint {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .ba-comparison {
        grid-template-columns: 1fr;
    }
    
    .portfolio-prev,
    .portfolio-next {
        display: none;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-btn {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-suffix {
        font-size: 16px;
    }
}

/* ========================================
   Utilities & Animations
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
