/**
 * 우리마음상담센터 - 공통 스타일
 * 모든 페이지에서 사용되는 기본 스타일
 */

/* ========================================
   1. 기본 리셋 및 타이포그래피
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* 기본 제목 스타일 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #333;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: #3498DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980B9;
}

/* ========================================
   2. 레이아웃 컨테이너
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    margin-top: 130px; /* 헤더(80px) + 네비게이션(50px) */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 0.5rem 0 0.5rem; /* 최소한의 좌우 패딩 */
    min-height: calc(100vh - 200px);
}

.page-content {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

/* 중앙 정렬 텍스트 */
.page-content.text-center {
    text-align: center;
}

/* 섹션 제목 */
.page-content h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.page-content h2 {
    color: #333;
    margin-bottom: 1.2rem;
    font-size: 2.2rem;
    font-weight: 600;
}

.page-content h3 {
    color: #333;
    margin: 1.8rem 0 1.2rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.page-content h4 {
    color: #333;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 500;
}

.page-content p {
    color: #666;
    line-height: 1.7;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.page-content ul {
    list-style: none;
    padding: 0;
}

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

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

/* ========================================
   3. 버튼 스타일
   ======================================== */
.btn, .cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary, .cta-button {
    background: #3498DB;
    color: white;
}

.btn-primary:hover, .cta-button:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: #27AE60;
    color: white;
}

.btn-success:hover {
    background: #2ECC71;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* ========================================
   4. 전화번호 버튼 (CTA)
   ======================================== */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.phone-button, .contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 280px;
    height: 60px;
    text-align: center;
    font-size: 1rem;
    box-sizing: border-box;
}

.phone-button {
    background: #27AE60;
    color: white;
}

.contact-button {
    background: #3498DB;
    color: white;
}

.phone-button:hover {
    background: #2ECC71;
    transform: scale(1.05);
    color: white;
}

.contact-button:hover {
    background: #2980B9;
    transform: scale(1.05);
    color: white;
}

/* 전화 아이콘 */
.phone-button::before,
.contact-button::before {
    content: "📞";
    font-size: 0.9rem;
    margin-right: 0.4rem;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* ========================================
   5. CTA 섹션 스타일
   ======================================== */
.cta-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    text-align: center;
    color: #333;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.cta-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    color: #27AE60;
}

.cta-content p {
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #555;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.cta-phone-button {
    background: #27AE60;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 280px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.cta-contact-button {
    background: #3498DB;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 280px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.cta-phone-button:hover {
    background: #2ECC71;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    color: white;
}

.cta-contact-button:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    color: white;
}

.phone-number {
    font-size: 1rem;
    font-weight: bold;
    display: inline;
    margin-left: 0.3rem;
}

.cta-message {
    font-size: 1rem;
    margin-top: 2rem;
    font-weight: 500;
    color: #666;
}

/* ========================================
   5. 이모지 스타일
   ======================================== */
/* 이모지 전역 크기 제한 */
body *:not(.large-emoji) {
    font-size: inherit;
}

/* 이모지가 포함된 요소의 크기 제한 */
.emoji,
[role="img"],
.emoji-container {
    display: inline-block;
    max-width: 2em;
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
}

/* 이모지 크기 제한을 위한 전용 클래스 - 강화된 규칙 */
h3 .emoji-small,
.text-container h3 .emoji-small,
.page-content h3 .emoji-small {
    font-size: 1.2rem !important;
    line-height: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 0.5rem !important;
    max-width: 1.5em !important;
    max-height: 1.5em !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ========================================
   6. 유틸리티 클래스
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }

/* ========================================
   7. 반응형 기본 설정
   ======================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .main-content {
        margin-top: 130px !important; /* 모바일에서는 헤더 + 여백 */
    }
    
    .page-content {
        margin: 0 auto 3rem auto;
        padding: 1.5rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }
    
    .contact-buttons {
        gap: 0.5rem;
    }
    
    .phone-button, .contact-button {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
        min-width: 200px;
        height: 50px;
    }
    
    .cta-phone-button, .cta-contact-button {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
        min-width: 200px;
        height: 50px;
    }
    
    .cta-content h3 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .cta-message {
        font-size: 1rem;
    }
    
    .page-content h2 {
        font-size: 1.6rem;
    }
    
    .page-content p {
        font-size: 1rem;
    }
    
    /* 모바일에서 전용 이모지 클래스 - 강화된 규칙 */
    h3 .emoji-small,
    .text-container h3 .emoji-small,
    .page-content h3 .emoji-small {
        font-size: 1rem !important;
        max-width: 1.2em !important;
        max-height: 1.2em !important;
        margin-right: 0.3rem !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: inherit !important;
        display: inline-block !important;
        position: relative !important;
        z-index: 1 !important;
    }
}
