@charset "utf-8";

/* ========================================
   로고 전용 폰트 - Cafe24ProSlim
   ======================================== */
@font-face {
    font-family: 'Cafe24ProSlim';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2511-1@1.0/Cafe24PROSlim-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Cafe24ProSlim';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2511-1@1.0/Cafe24PROSlim-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Cafe24ProSlim';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2511-1@1.0/Cafe24PROSlim-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/* ========================================
   로고 브랜드 스타일
   ======================================== */
.logo-brand {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    top: -4px;
}

/* 메인 텍스트*/
.logo-main {
    font-family: 'Cafe24ProSlim', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGradient 4s ease infinite;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

/* 점 - . */
.logo-dot {
    color: #f093fb;
    font-weight: 900;
    animation: logoPulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(240, 147, 251, 0.6);
}

/* 확장자 - NET */
.logo-ext {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
    font-weight: 700;
    color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-left: 1px;
}

/* 코드 블록 스타일 배경 (선택적) */
.logo-ext::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -4px;
    height: 70%;
    transform: translateY(-50%);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    z-index: -1;
}

/* 호버 효과 */
#nex_logo a:hover .logo-main {
    animation: logoGradient 1s ease infinite;
}

#nex_logo a:hover .logo-dot {
    animation: logoPulse 0.5s ease-in-out infinite;
    transform: scale(1.2);
}

#nex_logo a:hover .logo-ext {
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* 그라데이션 애니메이션 */
@keyframes logoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 점 펄스 애니메이션 */
@keyframes logoPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* 다크모드 강화 */
[data-theme="dark"] .logo-main {
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

[data-theme="dark"] .logo-dot {
    text-shadow: 0 0 15px rgba(240, 147, 251, 0.8);
}

[data-theme="dark"] .logo-ext::before {
    background: rgba(16, 185, 129, 0.15);
}

/* 푸터 로고 (살짝 작게) */
.nex_footer_logo .logo-brand {
    font-size: 1.4rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .logo-brand {
        font-size: 1.05rem;
    }
    .nex_footer_logo .logo-brand {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .logo-brand {
        font-size: 0.95rem;
    }
    .nex_footer_logo .logo-brand {
        font-size: 0.9rem;
    }
}

/* 메인 비주얼 개선 */
#nex_main_visual { 
    margin-top: 2rem; 
    margin-bottom: 3rem; 
    position: relative;
}

.nex-main-banner { 
    position: relative; 
    width: 100%; 
    height: 0; 
    padding-bottom: 40%; 
    background-color: var(--card-bg); 
    border-radius: 1.25rem; 
    overflow: hidden; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); 
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s ease;
}

#nex_main_visual.active .nex-main-banner {
    transform: translateY(0);
    opacity: 1;
}

.nex-main-banner img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 8s ease;
}

.nex-main-banner:hover img {
    transform: scale(1.05);
}

.nex-main-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem 3rem 3rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    color: #ffffff;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.2s;
}

#nex_main_visual.active .nex-main-banner-content {
    transform: translateY(0);
    opacity: 1;
}

.nex-main-banner-content h2 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.8),
        0 4px 12px rgba(0,0,0,0.5),
        0 0 30px rgba(0,0,0,0.3);
    color: #ffffff;
}
.nex-main-banner-content p {
    font-size: 1.25rem;
    margin-top: 0.75rem;
    text-shadow:
        0 1px 3px rgba(0,0,0,0.8),
        0 2px 8px rgba(0,0,0,0.5);
    max-width: 600px;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
}

/* 메인 콘텐츠 영역 */
.nex_section { 
    margin-bottom: 5rem; 
    position: relative;
}
.nex_section_title { 
    margin-bottom: 2.5rem; 
    text-align: center; 
    position: relative;
}
.nex_section_title h2 { 
    font-size: 2.25rem; 
    font-weight: 800; 
    margin-bottom: 0.75rem; 
    position: relative;
    display: inline-block;
}
.nex_section_title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-second));
    border-radius: 3px;
}
.nex_section_title p { 
    font-size: 1.1rem; 
    color: var(--secondary-color); 
    max-width: 700px;
    margin: 1rem auto 0;
}

/* 최신 포스트 카드 개선 */
.nex-latest-item { 
    margin-bottom: 2rem; 
    height: 100%; 
}

.nex-card { 
    background-color: var(--card-bg); 
    border-radius: 1rem; 
    overflow: hidden; 
    transition: all 0.4s ease; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid var(--border-color); 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}
.nex-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1); 
    border-color: rgba(93, 95, 239, 0.3);
}

.nex-thumb { 
    position: relative; 
    overflow: hidden; 
}
.nex-thumb::before { 
    content: ''; 
    display: block; 
    padding-top: 56.25%; 
}
.nex-thumb img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease; 
}
.nex-thumb:hover img { 
    transform: scale(1.1); 
}

.nex-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nex-thumb:hover::after {
    opacity: 1;
}

.nex-latest-content { 
    padding: 1.75rem; 
    display: flex; 
    flex-direction: column; 
    flex: 1; 
}
.nex-latest-category { 
    font-size: 0.8rem; 
    font-weight: 600; 
    color: var(--accent-color); 
    margin-bottom: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    display: inline-block; 
    background-color: rgba(93, 95, 239, 0.1); 
    padding: 0.25rem 0.75rem; 
    border-radius: 2rem; 
    transition: all 0.3s ease;
}
.nex-card:hover .nex-latest-category {
    background-color: var(--accent-color);
    color: white;
}
.nex-latest-title { 
    font-size: 1.35rem; 
    font-weight: 700; 
    line-height: 1.4; 
    margin-bottom: 0.85rem; 
}
.nex-latest-title a { 
    color: var(--body-color); 
    transition: color 0.3s ease;
    position: relative;
    display: inline;
    background-image: linear-gradient(transparent 0%, transparent calc(100% - 2px), rgba(93, 95, 239, 0.3) calc(100% - 2px), rgba(93, 95, 239, 0.3) 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}
.nex-latest-title a:hover { 
    color: var(--accent-color);
    background-size: 100% 100%;
}
.nex-latest-excerpt { 
    font-size: 0.95rem; 
    color: var(--secondary-color); 
    margin-bottom: 1.25rem; 
    line-height: 1.7; 
    flex: 1; 
}
.nex-latest-info { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85rem; 
    color: var(--secondary-color); 
    margin-top: auto; 
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}
.nex-latest-author {
    font-weight: 500;
    display: flex;
    align-items: center;
}
.nex-latest-author::before {
    content: '👤';
    margin-right: 0.25rem;
    font-size: 0.9rem;
}
.nex-latest-date {
    display: flex;
    align-items: center;
}
.nex-latest-date::before {
    content: '📅';
    margin-right: 0.25rem;
    font-size: 0.9rem;
}

/* 카테고리 카드 개선 */
.category-card { 
    display: block; 
    padding: 2rem 1.75rem; 
    text-align: center; 
    background-color: var(--card-bg); 
    border-radius: 1rem; 
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden; 
    border: 1px solid var(--border-color); 
    height: 100%; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.category-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 5px; 
    background: linear-gradient(90deg, var(--accent-color), var(--accent-second)); 
}
.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-image: linear-gradient(0deg, rgba(93, 95, 239, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.category-card:hover::after {
    opacity: 1;
}
.category-card h3 { 
    margin-bottom: 0.85rem; 
    font-size: 1.35rem; 
    position: relative; 
    z-index: 2; 
    font-weight: 700;
    transition: all 0.3s ease;
}
.category-card p { 
    font-size: 0.95rem; 
    color: var(--secondary-color); 
    position: relative; 
    z-index: 2; 
    transition: all 0.3s ease;
}
.category-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1); 
    border-color: rgba(93, 95, 239, 0.3);
}
.category-card:hover h3 {
    color: var(--accent-color);
    transform: translateY(-3px);
}
.category-card:hover p {
    transform: translateY(-3px);
}

/* 태그 클라우드 개선 */
.tag-link { 
    display: inline-block; 
    padding: 0.5rem 1rem; 
    margin: 0.35rem; 
    border-radius: 2rem; 
    background-color: rgba(93, 95, 239, 0.1); 
    font-size: 0.9rem; 
    font-weight: 500;
    color: var(--accent-color); 
    transition: all 0.3s ease; 
}
.tag-link:hover {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(93, 95, 239, 0.25);
}
.tag-size-1 { font-size: 0.8rem; }
.tag-size-2 { font-size: 0.9rem; }
.tag-size-3 { font-size: 1rem; }
.tag-size-4 { font-size: 1.1rem; }
.tag-size-5 { font-size: 1.2rem; font-weight: 600; }

.tag-hover {
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* 방문자 리뷰 카드 개선 */
.review-card { 
    background-color: var(--card-bg); 
    border-radius: 1rem; 
    padding: 1.75rem; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid var(--border-color); 
    height: 100%; 
    transition: all 0.3s ease; 
    position: relative;
    overflow: hidden;
}
.review-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(93, 95, 239, 0.05);
    transition: all 0.3s ease;
}
.review-card:hover::before {
    transform: translateY(5px);
    color: rgba(93, 95, 239, 0.1);
}
.review-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1); 
    border-color: rgba(93, 95, 239, 0.3);
}
.review-header { 
    display: flex; 
    align-items: center; 
    margin-bottom: 1.25rem; 
}
.review-avatar { 
    width: 55px; 
    height: 55px; 
    border-radius: 50%; 
    background-color: var(--accent-color); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-weight: bold; 
    margin-right: 1rem; 
    font-size: 1.1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.review-card:hover .review-avatar {
    transform: scale(1.1) rotate(10deg);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}
.review-info { flex: 1; }
.review-name { 
    font-weight: 600; 
    margin: 0; 
    color: var(--body-color); 
    font-size: 1.1rem;
}
.review-date { 
    font-size: 0.85rem; 
    color: var(--secondary-color); 
    margin: 0.25rem 0 0; 
}
.review-content { 
    font-size: 1rem; 
    line-height: 1.7; 
    color: var(--body-color); 
    margin: 0; 
    position: relative;
    z-index: 2;
}

/* 공지사항 리스트 개선 */
.notice-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.notice-item { 
    padding: 0.85rem 0; 
    border-bottom: 1px solid var(--border-color); 
    transition: all 0.2s ease;
}
.notice-item:last-child { 
    border-bottom: none; 
}
.notice-item:hover {
    padding-left: 0.5rem;
    background-color: rgba(93, 95, 239, 0.03);
}
.notice-link { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.notice-title { 
    flex: 1; 
    color: var(--body-color); 
    transition: all 0.2s ease;
    position: relative;
    padding-left: 1.25rem;
}
.notice-title::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
    line-height: 0.8;
    transition: all 0.2s ease;
}
.notice-link:hover .notice-title::before {
    transform: scale(1.2);
}
.notice-date { 
    color: var(--secondary-color); 
    font-size: 0.85rem; 
}
.notice-link:hover .notice-title { 
    color: var(--accent-color); 
    font-weight: 500;
}

/* 알림 컴포넌트 */
.nex-alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    border-left: 4px solid;
}
.nex-alert-icon {
    margin-right: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nex-alert-content {
    flex: 1;
}
.nex-alert-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}
.nex-alert-content p {
    margin: 0;
    font-size: 0.9rem;
}
.nex-alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
}
.nex-alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
}
.nex-alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error-color);
}
.nex-alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info-color);
}

/* 카드 그리드 레이아웃 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 이미지 갤러리 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    height: 0;
    padding-bottom: 75%;
    transition: all 0.3s ease;
}
.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover::after {
    opacity: 1;
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    color: white;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* 반응형 설정 */
@media (max-width: 1200px) {
    .nex-main-banner-content h2 { font-size: 2.3rem; }
    .nex_section_title h2 { font-size: 2rem; }
}

@media (max-width: 992px) {
    .nex-main-banner-content h2 { font-size: 2rem; }
    .nex-main-banner-content p { font-size: 1.1rem; }
    .nex_section_title h2 { font-size: 1.8rem; }
    .nex-latest-title { font-size: 1.2rem; }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nex_section_title h2 { font-size: 1.6rem; }
    .nex_section_title p { font-size: 1rem; }
    .nex-main-banner-content { padding: 2rem 1.5rem; }
    .nex-main-banner-content h2 { font-size: 1.6rem; }
    .nex-main-banner { padding-bottom: 56.25%; /* 16:9 비율로 변경 */ }
    .category-card { padding: 1.5rem; }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

@media (max-width: 576px) {
    .nex_section_title h2 { font-size: 1.4rem; }
    .nex-main-banner-content h2 { font-size: 1.4rem; }
    .nex-main-banner-content p { font-size: 0.95rem; }
    .review-card { padding: 1.25rem; }
    .review-avatar { width: 45px; height: 45px; }
    .image-gallery {
        grid-template-columns: 1fr;
    }
}
/* 공지사항 및 태그 클라우드 카드 여백 조정 - 유연한 방식 */
.nex-card { 
    margin-bottom: 0 !important; /* 카드 하단 여백 제거 */
}

/* 공지사항/태그 클라우드 섹션 자체의 여백 조정 */
.nex_section.mt-50.mb-10,
.nex_section.mt-50.mb-30 {
    margin-bottom: 20px !important; /* 섹션 하단 여백 통일 */
}

/* 공지사항과 태그 클라우드 컨테이너 높이 맞추기 */
.row .col-md-6 {
    display: flex;
    flex-direction: column;
}

.row .col-md-6 .nex_section_title {
    flex-shrink: 0; /* 제목 영역 크기 고정 */
}

.row .col-md-6 .nex-card {
    flex-grow: 1; /* 남은 공간 채우기 */
    display: flex;
    flex-direction: column;
}

.row .col-md-6 .nex-card > div {
    flex-grow: 1; /* 카드 내부 콘텐츠 영역도 확장 */
}

/* 컬럼 하단 여백 제거 */
.col-md-6.mb-10, 
.col-md-6.mb-30 {
    margin-bottom: 0 !important;
}

/* 최신 포스트 모바일 레이아웃 개선 */
@media (max-width: 768px) {
    .latest-posts-row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .latest-post-col {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 30px; /* 아이템 간 수직 간격 확보 */
    }

    .nex-latest-item {
        margin-bottom: 0; /* 기존 마진 제거하고 컬럼에 마진 적용 */
    }
}

@media (max-width: 576px) {
    .latest-post-col {
        margin-bottom: 40px; /* 더 작은 화면에서 더 큰 간격 */
    }
    
    /* 글자 크기 조정으로 여백 확보 */
    .nex-latest-title {
        font-size: 1.2rem;
    }
    
    .nex-latest-excerpt {
        font-size: 0.9rem;
    }
}

/* 중간 크기 화면에서 2행으로 표시될 때의 레이아웃 개선 */
@media (min-width: 577px) and (max-width: 991px) {
    .row .col-md-6:nth-child(odd) {
        clear: left; /* 홀수 번째 아이템에서 항상 새 줄 시작 */
    }
    
    .col-md-6 {
        margin-bottom: 30px; /* 각 행 사이 여백 확보 */
    }
    
    /* 마지막 아이템이 홀로 있을 때 (3번 아이템) 여백 추가 */
    .row .col-md-6:last-child:nth-child(odd) {
        margin-left: 0; /* 좌측 정렬 */
        margin-right: auto;
    }
}

/* 작은 화면에서는 모든 아이템을 세로로 쌓음 */
@media (max-width: 576px) {
    .col-sm-12 {
        margin-bottom: 30px;
    }
    
    .nex-card {
        height: auto; /* 높이 자동 조정 */
    }
}
