@charset "utf-8";

/* * [CSS Reset 및 기본 설정] */
:root {
    --nx-primary-color: #3b82f6;
    --nx-primary-hover: #2563eb;
    --nx-text-main: #1f2937;
    --nx-text-sub: #6b7280;
    --nx-bg-card: #f3f4f6; /* 빈 공간 채워질 배경색 */
    --nx-border-color: #e5e7eb;
    --nx-transition-speed: 0.3s;
}

/* [캐러절 메인 래퍼] */
.nx-board-slider-section {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 40px auto;
    position: relative;
 
}

.nx-board-slider-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 8px;
    gap: 16px;
}

.nx-board-slider-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nx-text-main);
    margin: 0;
    white-space: nowrap;
}

.nx-board-slider-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--nx-transition-speed);
}

.nx-board-slider-title a:hover {
    color: var(--nx-primary-color);
}

.nx-board-header-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--nx-border-color);
}

.nx-board-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* [네비게이션 및 컨트롤 버튼] */
.nx-board-ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--nx-border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--nx-transition-speed);
    color: var(--nx-text-sub);
    padding: 0;
}

.nx-board-ctrl-btn:hover {
    color: var(--nx-primary-color);
    border-color: var(--nx-primary-color);
    background-color: #eff6ff;
}

.nx-board-ctrl-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #d1d5db;
    border-color: #e5e7eb;
    background-color: #ffffff;
}

/* [캐러절 컨테이너 & 트랙] */
.nx-board-slider-container {
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    padding: 10px 0;
    touch-action: pan-y;
}

.nx-board-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    cursor: grab;
}

.nx-board-slider-track:active {
    cursor: grabbing;
}

.nx-board-slider-item {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    user-select: none;
}

@media (min-width: 640px) { .nx-board-slider-item { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 1024px) { .nx-board-slider-item { flex: 0 0 33.3333%; max-width: 33.3333%; } }
@media (min-width: 1280px) { .nx-board-slider-item { flex: 0 0 25%; max-width: 25%; } }
@media (min-width: 1600px) { .nx-board-slider-item { flex: 0 0 25%; max-width: 25%; } }

/* --- [오직 이미지만 + 호버 시 오버레이] --- */
.nx-board-card {
    background-color: var(--nx-bg-card); /* 이미지 여백이 생길 때 채워질 배경색 */
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform var(--nx-transition-speed), box-shadow var(--nx-transition-speed);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    /* 높이는 php 인라인 스타일에서 제어됩니다. */
}

.nx-board-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.nx-board-card-img {
    width: 100%;
    height: 100%;
    /* 억지로 비율을 고정하지 않고 원본 비율 유지, 남는 공간은 배경색이 채움 */
    object-fit: contain; 
    transition: transform 0.5s ease;
}

.nx-board-card:hover .nx-board-card-img {
    transform: scale(1.05);
}

/* 텍스트 오버레이 영역 (기본적으로 숨김) */
.nx-board-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.75;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

.nx-board-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* [호버 상태] 또는 [현재 활성화된(첫번째) 슬라이드]일 때 텍스트 노출 */
.nx-board-card:hover .nx-board-card-overlay,
.nx-board-slider-item.nx-active-slide .nx-board-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* [데이터 없음] */
.nx-board-empty {
    width: 100%;
    text-align: center;
    padding: 60px 0;
    color: #9ca3af;
    font-size: 0.9375rem;
}

/* [프로그레스 바 (Pagination)] */
.nx-board-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 0 8px;
}
.nx-board-progress-bar {
    flex-grow: 1;
    height: 4px;
    background-color: var(--nx-border-color);
    border-radius: 2px;
    overflow: hidden;
}
.nx-board-progress-fill {
    height: 100%;
    background-color: var(--nx-primary-color);
    width: 0%;
    transition: width var(--nx-transition-speed) ease-out;
}
.nx-board-progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nx-text-sub);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}