/*
 * 현대적 전문 디자인 CSS - 전체 화면 너비 버전
 * - 전체 HTML 구조 및 SmartCubic 구조 최적화
 * - 미니멀하고 세련된 UI/UX
 * - 부드러운 애니메이션과 트랜지션
 * - 완벽한 반응형 디자인
 * - 접근성 및 성능 최적화
 * * [최종 업데이트]
 * - 모바일 아이콘 로딩 속도 개선
 * - 이미지 경계 초과 방지
 * - 텍스트 가독성 최적화
 * - 가로 모드 폭 확장
 * - 로딩 스피너 완전 제거
 * - 모바일 회원가입 폼 항목 가시성 문제 해결 (폼 요소 강제 표시 및 레이아웃 최적화)
 * - 모바일 회원가입 폼 텍스트/라벨 가시성 강화 (색상, 폰트, 대비 최적화)
 * - 모바일 아이콘과 타이틀 간격 밀착 최적화 (아이콘 두 개와 타이틀 정렬 개선)
 * - [신규 수정] 모바일 회원 약관 텍스트 선명도 강화 (희미함 완전 해결)
 * - [신규 수정] 모바일 개인공지 글자 선명도 강화 ("개인공지" 텍스트 완전 표시)
 * - [신규 수정] 모바일 검색 화면 배경 검정색 문제 해결 (배경 흰색 고정)
 * - [신규 수정] 모바일 상단 메뉴 강조 (배경, 그림자, 폰트 강화로 시각적 강조)
 * - [신규 수정] 모바일 상단 로고/아이콘 2줄 현상 수정 (flex-wrap: nowrap 적용)
 */

/* ========== CSS 변수 정의 ========== */
:root {
    /* 색상 팔레트 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #475569;
    --accent-color: #f59e0b;
    --accent-light: #fef3c7;
    
    /* 그레이스케일 */
    --dark-color: #0f172a;
    --gray-900: #1e293b;
    --gray-700: #334155;
    --gray-500: #64748b;
    --gray-300: #cbd5e1;
    --gray-100: #f1f5f9;
    --light-color: #f8fafc;
    
    /* 배경 및 테두리 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    
    /* 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 트랜지션 */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 보더 라디우스 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* 간격 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ========== 기본 스타일 리셋 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

/* ========== 컨테이너 시스템 ========== */
.container,
.container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
    width: 100% !important;
}

/* 컬럼 시스템 - 반응형 그리드 */
.col,
[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* 모바일 (기본) */
.col-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

/* 작은 화면 (576px 이상) */
@media (min-width: 576px) {
    .col-sm-5 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
    }
}

/* 중간 화면 (768px 이상) */
@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* 큰 화면 (992px 이상) */
@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
    }
}

/* 아주 큰 화면 (1200px 이상) */
@media (min-width: 1200px) {
    .col-xl-2 {
        flex: 0 0 16.666667% !important;
        max-width: 16.666667% !important;
    }
}

.content-padding {
    padding: 0 !important;
}

/* ========== 타이포그래피 ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.display-4 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

/* ========== Ajax 로딩 완전 제거 ========== */
#ajaxLoadingImage,
.loading-spinner,
.spinner,
.loader,
.loading,
.spinner-border,
.spinner-grow,
.loading-overlay,
.spinner-overlay,
[class*="loading"],
[class*="spinner"],
[class*="loader"],
[id*="loading"],
[id*="spinner"],
[id*="loader"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    z-index: -9999 !important;
}

/* 로딩 관련 배경 오버레이 제거 */
body::before,
body::after,
.modal-backdrop.loading,
.overlay.loading {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ========== 사이트 헤더 (sc-site-header) ========== */
.sc-site-top {
    width: 100%;
    background: var(--bg-primary);
    box-shadow: var(--shadow);
}

.blog-header,
.sc-site-header {
    padding: 1.25rem 2rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.blog-header-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-color);
    transition: var(--transition);
    text-decoration: none;
    transition: var(--transition);
    background: var(--bg-primary);
}

.blog-header-logo:hover {
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
}

.sc-list-paging .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sc-list-paging .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========== 네비게이션 메뉴 (sc-site-menu) ========== */
.navbar,
.sc-site-menu {
    padding: 0;
    background-color: #ffffff !important;
    box-shadow: var(--shadow-sm);
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.navbar-light {
    background-color: #ffffff !important;
}

.bg-light {
    background-color: #ffffff !important;
}

.navbar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0;
    background-color: #ffffff !important;
}

.nav-item {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #1a202c !important;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: var(--transition);
    color: #1a202c !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    transform: translateY(-2px);
}

.nav-link:hover i {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}

.nav-item.active .nav-link,
.nav-link.active {
    color: var(--primary-color) !important;
    background: var(--primary-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* ========== 드롭다운 메뉴 ========== */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 14rem;
    background-color: var(--bg-primary) !important;
    opacity: 1 !important;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: 0.25rem;
}

/* ========== 마이페이지 메뉴 (sc-mypage-menu) ========== */
.sc-mypage-menu {
    width: 100%;
    margin: var(--spacing-lg) 0;
}

.sc-mypage-menu .btn-group {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
}

.sc-mypage-menu .btn-group > a {
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    min-width: 140px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--gray-700);
    text-decoration: none;
}

.sc-mypage-menu .btn-group > a:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.sc-mypage-menu .btn-group > a.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========== 큐빅 검색 (sc-cubic-search) ========== */
.sc-cubic-search {
    width: 100%;
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-lg);
}

/* ========== 퍼머링크 스타일 (SmartCubic 구조) ========== */
/* 퍼머링크 헤더 (sc-permalink-header) */
.sc-permalink-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--dark-color) !important;
    box-shadow: var(--shadow-lg);
    padding: 1rem 2rem;
}

.sc-permalink-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

/* 퍼머링크 컨테이너 (sc-permalink-container) */
.sc-permalink-container {
    width: 100%;
    padding: var(--spacing-xl) var(--spacing-md);
    margin-top: 60px;
}

/* 퍼머링크 타이틀 (sc-permalink-title) */
.sc-permalink-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.sc-permalink-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
}

/* 퍼머링크 정보 (sc-permalink-info) */
.sc-permalink-info {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.sc-permalink-info .card-body {
    padding: var(--spacing-lg);
}

.sc-permalink-info img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 퍼머링크 메뉴 탭 (sc-permalink-menu-tab) */
.sc-permalink-menu-tab {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.sc-permalink-menu-tab .nav-link {
    padding: 1rem 2rem;
    font-weight: 600;
    color: var(--gray-700);
    border: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.sc-permalink-menu-tab .nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.sc-permalink-menu-tab .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 퍼머링크 메뉴 컨텐츠 (sc-permalink-menu-content) */
.sc-permalink-menu-content {
    width: 100%;
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-lg);
    min-height: 400px;
}

/* 퍼머링크 게시판 (sc-permalink-board) */
.sc-permalink-board {
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.sc-permalink-board .card {
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-color);
}

.sc-permalink-board .card-header {
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
}

.sc-permalink-board .card-header:hover {
    background: var(--primary-light);
}

.sc-permalink-board .btn-link {
    width: 100%;
    text-align: left;
    color: var(--dark-color);
    font-weight: 600;
    text-decoration: none;
}

/* 퍼머링크 댓글 (sc-permalink-comment) */
.sc-permalink-comment {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
}

.sc-permalink-comment .card-body {
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-md);
    margin-left: 30px;
    transition: var(--transition);
}

.sc-permalink-comment .card-body:hover {
    background: var(--gray-100);
}

.sc-permalink-comment .card-title {
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.sc-permalink-comment .badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.sc-permalink-comment .card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.sc-permalink-comment .card-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 퍼머링크 푸터 (sc-permalink-footer) */
.sc-permalink-footer {
    width: 100%;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    color: var(--gray-700);
    margin-top: auto;
}

/* ========== 구글맵 모달 (sc-google-map) ========== */
.sc-google-map {
    z-index: 1060;
}

.sc-google-map .modal-dialog {
    max-width: 90%;
    height: 90vh;
}

.sc-google-map .modal-content {
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ========== 사이트 푸터 (sc-site-footer) ========== */
.blog-footer,
.sc-site-footer {
    width: 100%;
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-primary);
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: var(--gray-700);
    margin-top: auto;
    position: relative;
    bottom: 0;
}

.blog-footer p,
.sc-site-footer p {
    margin-bottom: 0.5rem;
}

.blog-footer p:last-child,
.sc-site-footer p:last-child {
    margin-bottom: 0;
}

/* 푸터가 페이지 하단에 고정되도록 body 레이아웃 조정 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sc-site-main,
main[role="main"] {
    flex: 1 0 auto;
}

.sc-site-footer,
.blog-footer {
    flex-shrink: 0;
}

/* ========== 버튼 스타일 ========== */
.btn {
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--gray-500);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-700);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ========== 아이콘 그리드 ========== */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    width: 100%;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    min-height: 120px;
    justify-content: flex-start;
}

.icon-item h3,
.icon-item .title,
.icon-item span,
.icon-item div {
    display: block;
    visibility: visible;
    opacity: 1;
}

.icon-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.icon-item i {
    font-size: 3rem !important;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color) !important;
    transition: var(--transition);
    flex-shrink: 0 !important;
    width: 3rem !important;
    height: 3rem !important;
    line-height: 3rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.icon-item:hover i {
    transform: scale(1.1);
}

.icon-item h3,
.icon-item .title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #1a1a1a !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    background: transparent !important;
    text-shadow: none !important;
}

/* ========== 폼 요소 ========== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========== 유틸리티 클래스 ========== */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.no-padding { padding: 0 !important; }
.no-margin { margin: 0 !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

/* ========== 애니메이션 ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in-up {
    animation: slideInUp 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* ========== 스크롤바 커스텀 ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-500);
    border-radius: 5px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-700);
}

/* ========== 캐러셀/슬라이드 (sc-site-slide) ========== */
.carousel,
.sc-site-slide {
    margin: 0 !important;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    position: relative;
    display: none;
    float: left;
    width: 100%;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.active {
    display: block;
    animation: fadeInSlide 0.8s ease-in-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0.7;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.main-slide-img {
    object-fit: cover;
    width: 100%;
    height: 600px;
    transition: transform 1s ease;
}

.carousel-item.active .main-slide-img {
    animation: kenBurns 20s infinite alternate;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    50% { transform: scale(1.08) translate(-2%, -1%); }
    100% { transform: scale(1); }
}

.carousel-caption {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 2rem;
    text-align: center;
    max-width: 800px;
    width: 90%;
}

.carousel-caption h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.8),
        4px 4px 8px rgba(0,0,0,0.6),
        0 0 40px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.carousel-caption p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.7),
        0 0 20px rgba(0,0,0,0.5);
    margin-bottom: 0;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: var(--transition);
    background: transparent;
    border: none;
    z-index: 2;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    left: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
}

.carousel-control-next {
    right: 0;
    background: linear-gradient(270deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    z-index: 2;
}

.carousel-indicators li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    opacity: 1;
}

.carousel-indicators .active {
    width: 30px;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ========== 페이지 타이틀 (sc-site-title) ========== */
.jumbotron,
.sc-site-title {
    margin: 0 !important;
    padding: 3rem 2rem !important;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    background-color: #1a202c !important;
}

.jumbotron::before,
.sc-site-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

.jumbotron > *,
.sc-site-title > * {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
}

.jumbotron h1, .jumbotron h2, .jumbotron h3, .jumbotron h4, .jumbotron h5, .jumbotron h6,
.sc-site-title h1, .sc-site-title h2, .sc-site-title h3, .sc-site-title h4, .sc-site-title h5, .sc-site-title h6 {
    color: #ffffff !important;
}

.outlined-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==================================================================== */
/* 📝 모바일 환경 최적화 (767px 이하) */
/* ==================================================================== */
@media (max-width: 767px) {
    /* 기본 컨테이너 패딩 축소 */
    .container,
    .container-fluid {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    /* 페이지 타이틀 섹션 패딩 축소 */
    .jumbotron,
    .sc-site-title {
        padding: 2rem 1rem !important;
    }

    /* 캐러셀 캡션 텍스트 크기 축소 */
    .carousel-caption h2 {
        font-size: 1.75rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    /* 컬럼 시스템 최적화 */
    .col,
    [class*="col-"] {
        padding-right: 5px !important;
        padding-left: 5px !important;
    }

    .row {
        margin-right: -5px !important;
        margin-left: -5px !important;
    }

    /* 퍼머링크 메뉴 탭 가로 스크롤 허용 */
    .sc-permalink-menu-tab {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    .sc-permalink-menu-tab .nav-link {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
    }
    
    /* 회원가입 폼 요소 전체 강제 표시 */
    .register-form .form-group, .sc-register-form .form-group {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 회원가입 폼 라벨 강제 표시 */
    .register-form label, .sc-register-form label {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-weight: 700 !important;
        color: var(--dark-color) !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* 회원가입 입력 필드 강제 표시 및 높이 확보 */
    .form-control, input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]), textarea, select {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 40px !important;
        line-height: 1.5 !important;
        padding: 8px 12px !important;
        color: #000000 !important; /* 글자색 강제 설정 */
        background-color: #ffffff !important; /* 배경색 강제 설정 */
        border: 1px solid #d1d5db !important;
    }

    /* 모바일 아이콘의 이미지 크기 및 간격 조정 */
    .icon-item img, .icon-card img, .sc-item-cubic img {
        /* 아이콘 이미지 최대 크기를 85px로 확대 */
        max-width: 85px !important;
        max-height: 85px !important;
        width: auto !important;
        height: auto !important;
        /* 아이콘과 타이틀 사이의 간격 조정을 위해 하단 마진을 최소화 */
        margin-bottom: 3px !important;
    }
    
    /* 아이콘과 타이틀 간격 좁히기 및 컨테이너 조정 */
    .icon-item, .icon-card {
        /* 컨테이너의 최소 높이 및 패딩을 줄여서 불필요한 여백을 제거하고 간격을 좁힘 */
        min-height: 100px !important; /* 컨테이너 최소 높이 축소 */
        padding: 10px 5px !important; /* 내부 패딩 축소 */
    }

    .icon-item h3, .icon-item .title, .icon-card h3, .icon-card .title {
        /* 타이틀 상단 마진을 더 줄여 아이콘에 최대한 가깝게 붙이기 */
        margin-top: 3px !important;
        font-size: 15px !important;
    }
}

/* ==================================================================== */
/* 📝 모바일: 상단 로고/아이콘 2줄 현상 수정 (추가된 수정 내용) */
/* ==================================================================== */
@media (max-width: 767px) {
    /* 1. Header 내부 컨테이너에 줄바꿈 방지(nowrap) 강제 적용 */
    /* 로고, 타이틀, 아이콘이 포함된 상위 컨테이너를 타겟팅합니다. */
    .sc-site-header,
    .blog-header,
    .sc-site-header .container,
    .sc-site-header .container-fluid,
    .sc-site-header .row,
    .blog-header .container,
    .blog-header .container-fluid,
    .blog-header .row {
        display: flex !important;
        flex-wrap: nowrap !important; /* 핵심 수정: 2줄 현상 방지 */
        align-items: center !important;
        justify-content: space-between !important; 
        padding-left: 10px !important; 
        padding-right: 10px !important;
    }

    /* 2. 홈페이지 타이틀(로고 텍스트)이 공간을 넘치지 않도록 설정 */
    .blog-header-logo,
    .sc-site-header .navbar-brand {
        flex-shrink: 1 !important; /* 공간이 부족하면 줄어들게 함 */
        min-width: 0 !important; /* 최소 너비를 0으로 설정하여 유연하게 축소 */
        white-space: nowrap !important; /* 텍스트가 강제로 한 줄로 유지 */
        overflow: hidden !important; /* 넘치는 부분 숨김 */
        text-overflow: ellipsis !important; /* 넘칠 경우 줄임표(...) 표시 */
        margin-right: 10px !important; /* 아이콘과의 간격 확보 */
    }

    /* 3. 아이콘 그룹이 줄어들지 않고 고정된 공간을 유지하도록 설정 */
    /* 실제 아이콘 그룹을 감싸는 클래스에 따라 이 선택자를 조정해야 할 수 있습니다. */
    .sc-site-header .header-icons, 
    .sc-site-top .d-flex:last-child { 
        flex-shrink: 0 !important; /* 절대 줄어들지 않음 */
        margin-left: auto !important;
    }
}


/* ==================================================================== */
/* 📝 최종: 모바일 회원가입 및 개인공지 가시성, 검색 배경 색상 문제 해결 */
/* ==================================================================== */

/* [강화] 회원가입 폼 요소 및 레이블의 가시성 최대 확보 */
@media (max-width: 767px) {
    /* 1. 입력 필드 (칸)의 배경색과 글자색 설정 */
    .form-control, input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]), textarea, select {
        background-color: #ffffff !important; 
        color: #000000 !important; 
        -webkit-text-fill-color: #000000 !important; 
        opacity: 1 !important;
        font-weight: 700 !important;
        text-shadow: 0.3px 0.3px 0.5px rgba(0, 0, 0, 0.4) !important;
        filter: contrast(1.2) !important;
    }

    /* 2. 라벨 텍스트 선명도 강화 */
    .register-form label, .sc-register-form label, [class*="form-group"] label, [class*="control-label"] {
        color: #000000 !important; 
        -webkit-text-fill-color: #000000 !important; 
        font-weight: 800 !important;
        text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.5) !important;
    }

    /* 3. 버튼 텍스트 선명도 강화 */
    .btn, button {
        color: #ffffff !important; 
        font-weight: 900 !important;
        text-shadow: 0.7px 0.7px 1.5px rgba(0, 0, 0, 0.7) !important;
    }

    /* [신규 수정] 모바일 회원 약관 텍스트 선명도 강화 (희미함 완전 해결) */
    .terms-content, .agreement-content, [class*="terms"] p, [class*="agreement"] p, .register-form p, .sc-register-form p {
        color: #000000 !important; 
        -webkit-text-fill-color: #000000 !important; 
        opacity: 1 !important; 
        font-weight: 700 !important; 
        line-height: 1.8 !important; 
        text-shadow: 0.7px 0.7px 1.5px rgba(0, 0, 0, 0.6) !important; 
        background-color: transparent !important; 
        visibility: visible !important; 
        display: block !important; 
        filter: contrast(1.4) brightness(1.05) !important; 
    }
    
    /* [신규 수정] 모바일 개인공지 글자 선명도 강화 ("개인공지" 텍스트 완전 표시) */
    [class*="personal"] h1, [class*="personal"] h2, [class*="personal"] h3, [id*="personal"] h1, [id*="personal"] h2, [id*="personal"] h3, .personal-notice-title {
        color: #000000 !important; 
        -webkit-text-fill-color: #000000 !important; 
        opacity: 1 !important; 
        font-weight: 900 !important; 
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important; 
        visibility: visible !important; 
        display: block !important; 
    }
    
    /* 개인공지 섹션 전체 텍스트 선명화 */
    [class*="personal"] *, [id*="personal"] *, .personal-notice *, [class*="privacy"] *, [id*="privacy"] * { 
        color: #000000 !important; 
        -webkit-text-fill-color: #000000 !important; 
        opacity: 1 !important; 
        text-shadow: 0.3px 0.3px 0.5px rgba(0, 0, 0, 0.4) !important; 
        filter: contrast(1.2) !important; 
    }
    
    /* 개인공지 섹션 전체 강제 표시 (숨김 방지) */
    [class*="personal"][style*="display: none"], [id*="personal"][style*="display: none"], .personal-notice[style*="display: none"] { 
        display: block !important; 
        visibility: visible !important; 
        opacity: 1 !important; 
        height: auto !important; 
    }

    /* [신규 수정] 모바일 검색 화면 배경 검정색 문제 해결 (배경 흰색 고정) */
    .modal.search-modal .modal-content, 
    .modal.search-modal .modal-body, 
    .search-modal-content {
        background-color: #ffffff !important; 
        color: #000000 !important; 
        border-color: #e2e8f0 !important; 
    } 

    /* [신규 수정] 모바일 상단 메뉴 강조 - 배경, 그림자, 폰트 강화 */ 
    .navbar, .sc-site-menu, .sc-site-header, .blog-header { 
        background-color: #ffffff !important; 
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important; 
        border-bottom: 3px solid var(--primary-color) !important; 
        backdrop-filter: blur(20px) !important; 
        z-index: 2000 !important; 
        padding: 1rem 0 !important; 
    }
    .navbar-nav { 
        background-color: #ffffff !important; 
        padding: 0.75rem 0 !important; 
        gap: 0.5rem !important; 
    } 
    .nav-item { 
        font-size: 16px !important; 
        font-weight: 700 !important; 
    } 
    .nav-link { 
        padding: 1rem 1.5rem !important; 
        color: var(--dark-color) !important; 
        border-radius: var(--radius-lg) !important; 
        border: 2px solid transparent !important; 
        background: linear-gradient(white, white) padding-box, linear-gradient(to right, var(--primary-color), var(--accent-color)) border-box !important; 
        transition: var(--transition);
    }
}