/* ───────────── HERO 영역 ───────────── */
.pm-hero {
    min-height: 420px;
    position: relative;
    background: black;  /* ✅ 강제 배경 지정 */
}

.pm-hero .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.pm-hero .hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    text-align: center;
}

.pm-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.pm-hero .subtitle {
    font-size: 1rem;
    color: #ccc;
}

.pm-hero .breadcrumb {
    font-size: 0.9rem;
    color: #eee;
}

/* ───────────── 탭 메뉴 ───────────── */
.pm-tabs {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;          /* 데스크톱 = 가운데 정렬 */
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    z-index: 3;
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;         /* IE/Edge */
}

.pm-tabs::-webkit-scrollbar {
    display: none;                    /* Chrome/Safari */
}

.pm-tabs a {
    display: inline-block;
    color: white;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 20px;
    background: none;
}

.pm-tabs a.active {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.25);
}

/* ───────────── 섹션 타이틀 ───────────── */
.pm-section {
    background: linear-gradient(to bottom,
    #000000 0%,
    #1e2c6e 30%,
    #4e60e6 60%,
    #aab3ff 100%
    );
    padding: 4rem 1rem;
    color: white;
    text-align: center;
}

.pm-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.pm-section .subtitle {
    font-size: 0.95rem;
    color: #eee;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ───────────── 카드 그리드 ───────────── */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    transform: translateZ(0);
}

/* ───────────── 개별 카드 ───────────── */
.pm-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
    contain: content;
    will-change: transform;
    transition: transform 0.3s ease;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-card:hover {
    transform: scale(1.05);
}

.pm-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.pm-card:hover img {
    transform: scale(1.08);
}

/* ───────────── 모달 팝업 ───────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #fff;
    padding: 2rem 1rem 1rem;
    border-radius: 8px;
    max-width: 95vw;
    max-height: 90vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content:flex-start;
}

.modal-content img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* X 버튼 고정 */
.modal-close {
    position: sticky;
    top: 0;
    right: 0;
    margin-left: auto;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

/* ───────────── 반응형 ───────────── */
@media (max-width: 1024px) {
    .pm-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {

    .pm-hero { min-height: 300px; }

    .pm-grid { grid-template-columns: repeat(2, 1fr); }

    /* ---------- 모바일 탭 개선 ---------- */
    .pm-tabs {                     /* ★ PATCH */
        justify-content: flex-start;          /* ① 항상 왼쪽부터 시작 */
        -webkit-overflow-scrolling: touch;    /* ② iOS 부드러운 스크롤 */
        scroll-snap-type: x mandatory;        /* ③ 스냅(선택) */
        padding-left: 1rem;                   /* ④ 첫 탭 여백 */
    }
    .pm-tabs a {                   /* ★ PATCH */
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        scroll-snap-align: start;             /* ③ */
    }
    
}
