/* 기본 버튼 스타일 */
.responsive-button {
    display: block;
    width: calc(100% - 100px);
    margin: 20px auto;
    padding: 15px 0;
    background-color: #F32A13;
    color: white !important;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 32px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 12px 40px 0 rgba(0,0,0,0.32), 0 2px 16px 0 rgba(255,51,51,0.18), 0 1.5px 8px rgba(255,51,51,0.12);
}

.responsive-button:hover {
    background-color: #0A5EFF;
    color: #fff !important;
    transform: scale(1.05);
}

/* h2: 밝은 연두색 배경, 흰색 텍스트, 왼쪽 상단만 둥글게, 그림자 약하게 */
h2 {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffffff !important;
    padding: 18px 40px;
    margin: 40px 0 30px;
    background: linear-gradient(90deg, #b0ff8e 0%, #7cff5c 100%);
    border-radius: 18px 18px 0 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(120,220,120,0.10);
    text-shadow: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 4px solid #22c900;
    line-height: 1.4;
}

/* h3: 밝은 연두색 배경, 진한 검정 텍스트, 왼쪽 상단만 둥글게, ◆ 아이콘 포함 */
h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: #111;
    padding: 10px 18px;
    margin: 28px 0 18px;
    background: linear-gradient(90deg, #b0ff8e 0%, #7cff5c 100%);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 2px 8px rgba(120,220,120,0.10);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    border-bottom: 4px solid #22c900;
}

h3::before {
    content: '◆';
    color: #FFA500;
    font-size: 1.1em;
    margin-right: 6px;
    display: inline-block;
}

/* 기존 보라색 계열 스타일 제거 (덮어쓰기) */
.article_skin .area_view h2,
.article_skin .area_view h2::after {
    background: none;
    color: inherit;
    box-shadow: none;
    border-radius: 0;
    text-shadow: none;
    border: none;
}

/* 목차 스타일 */
.toc-container {
    max-width: 800px;
    margin: 30px auto;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    padding: 20px 30px;
}

.toc-header {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-header::before {
    content: '📚';
    font-size: 24px;
}

.toc-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background-color: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    width: 100%;
}

.toc-link:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #FF6B00;
    color: #FF6B00;
    background-color: #FFF8F3;
}

.toc-icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.toc-text {
    font-size: 17px;
    font-weight: 900;
    color: #0047AB;
}


/* 반응형 이미지 그리드 */
.image-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 20px;
}

.image-container img {
    width: calc((100% - 45px) / 4);
    max-width: 300px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* 4개 이하 이미지가 있을 때 무조건 가로 정렬 */
.image-container:has(img:nth-child(4)):not(:has(img:nth-child(5))) {
    flex-wrap: nowrap !important;
}

/* 모든 p 태그 기본 스타일 */
p {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
}

/* 중앙 정렬 컨테이너 */
.center-intro {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    text-align: left;
}

.center-intro p {
    font-size: 22px;
    line-height: 1.8;
    color: #222;
    margin-bottom: 30px;
    word-spacing: 2px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.center-intro p b {
    font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', '돋움', 'Dotum', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #222;
    background: linear-gradient(180deg,rgba(255,255,255,0) 65%, #FFE0B2 35%);
    padding: 0 5px;
}

/* 소제목 본문 스타일 */
.section-content {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px 20px;
    text-align: left;
}

.section-content p {
    font-size: 20px;
    line-height: 1.8;
    color: #222;
    margin-bottom: 25px;
    word-spacing: 1.5px;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.section-content p b {
    font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', '돋움', 'Dotum', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #222;
    background: linear-gradient(180deg,rgba(255,255,255,0) 65%, #FFE0B2 35%);
    padding: 0 5px;
}


/* 반응형 디자인 */
@media (max-width: 768px) {
    .image-container:has(img:nth-child(4)):not(:has(img:nth-child(5))) {
        flex-wrap: nowrap !important;
    }
    .image-container:has(img:nth-child(4)):not(:has(img:nth-child(5))) img {
        width: calc((100% - 30px) / 4) !important;
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .responsive-button {
        width: calc(100% - 40px);
        margin: 10px auto;
    }

    .image-container:has(img:nth-child(4)):not(:has(img:nth-child(5))) {
        flex-wrap: nowrap !important;
    }
    .image-container:has(img:nth-child(4)):not(:has(img:nth-child(5))) img {
        width: calc((100% - 30px) / 4) !important;
        min-width: 0;
        max-width: none;
    }

}

@media (max-width: 600px) {
    .responsive-button {
        font-size: 20px;
        padding: 12px 0;
    }
}

@media (max-width: 400px) {
    .responsive-button {
        font-size: 16px;
        padding: 10px 0;
    }
}