/**
 * 우리마음상담센터 - 콘텐츠 섹션 스타일
 * 정신질환, 알콜중독 페이지 등에서 사용되는 콘텐츠 섹션 스타일
 */

/* ========================================
   인용구 섹션
   ======================================== */
.quote-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid #3498DB;
}

.quote-section h2 {
    color: #3498DB;
    margin-bottom: 1.2rem;
    font-size: 2rem;
    font-weight: 600;
}

.main-content .page-content .quote-section blockquote {
    font-style: italic !important;
    color: #555 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* ========================================
   콘텐츠 섹션 (이미지 + 텍스트)
   ======================================== */
.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
    align-items: center;
}

/* 역순 레이아웃 (텍스트 좌측, 이미지 우측) */
.content-section.reverse {
    direction: rtl;
}

.content-section.reverse > * {
    direction: ltr;
}

/* 이미지 컨테이너 */
.image-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* 이미지 플레이스홀더 - 통일된 스타일 */
.image-placeholder {
    width: 100% !important;
    margin: 1.5rem 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* PC에서는 고정 높이 400px */
@media (min-width: 769px) {
    .image-placeholder {
        height: 400px !important;
    }
}

/* 모바일에서는 16:9 비율 */
@media (max-width: 768px) {
    .image-placeholder {
        aspect-ratio: 16/9 !important;
        height: auto !important;
    }
}

/* 빈 플레이스홀더 텍스트 */
.image-placeholder:empty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
    color: #6c757d !important;
    font-size: 1.1rem !important;
    background: #f8f9fa !important;
    border: 2px dashed #dee2e6 !important;
}

.image-placeholder:empty::before {
    content: "📷 이미지가 들어갈 영역";
}

/* 모든 이미지 센터 크롭 처리 */
.image-placeholder img,
.service-page-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 12px !important;
    display: block !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.3s ease !important;
}

.image-placeholder:hover img,
.image-placeholder:hover .service-page-image {
    transform: scale(1.02) !important;
}

/* 서비스 이미지 플레이스홀더 - 완전 통일된 컨테이너 */
.service-image-placeholder {
    /* 빈 상태일 때만 보이는 스타일 */
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: #999;
    
    /* 컨테이너 크기 완전 고정 */
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 1.5rem 0 !important; /* 위아래 여백만 - 모든 화면에서 동일 */
    box-sizing: border-box !important;
    
    /* 레이아웃 완전 제어 */
    display: block !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
    overflow: hidden !important;
    contain: layout !important;
}

/* 이미지가 있을 때 플레이스홀더 완전 투명화 */
.service-image-placeholder.has-image {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    
    /* 컨테이너 역할만 유지 */
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important; /* 여백은 유지 */
    box-sizing: border-box !important;
    display: block !important;
    overflow: hidden !important;
}

.service-image-placeholder::before {
    content: "📷 이미지 영역";
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* 이미지가 있을 때 플레이스홀더 스타일 제거 */
.service-image-placeholder.has-image::before {
    display: none;
}

/* 텍스트 컨테이너 */
.text-container {
    padding: 1.5rem;
}

.text-container h3 {
    color: #333;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

/* 이모지를 포함한 제목 */
.text-container h3 .emoji-small {
    font-size: 1.2rem !important;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.text-container p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.text-container ul {
    list-style: none;
    padding: 0;
}

.text-container ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.text-container ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #27AE60;
    font-weight: bold;
}

.text-container ul li strong {
    color: #333;
    font-weight: 600;
}

/* ========================================
   반응형 스타일
   ======================================== */
@media (max-width: 768px) {
    /* 인용구 섹션 모바일 */
    .quote-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .quote-section h2 {
        font-size: 1.3rem;
    }
    
    .main-content .page-content .quote-section blockquote {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* 콘텐츠 섹션 모바일 */
    .content-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-section.reverse {
        direction: ltr;
    }
    
    .text-container {
        padding: 1rem;
    }
    
    .text-container h3 {
        font-size: 1.3rem;
    }
    
    .text-container p {
        font-size: 0.95rem;
    }
    
    .text-container ul li {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .image-placeholder {
        min-height: 200px;
        font-size: 0.9rem;
    }
}
