/* ===============================
   BASE
================================ */
.main.is-sub{
	padding:0;
}
.catalog-container * {
    box-sizing: border-box;
}

/* ===============================
   HERO
================================ */
.hero {
    position: relative;
    width: 100%;
    height: 320px;
    background: url('/assets/img/catalog_main.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero-content {
    position: relative;
    color: #fff;
    text-align: center;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 700;
}

.hero-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* ===============================
   CONTAINER
================================ */
.catalog-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* ===============================
   HEADER
================================ */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.catalog-header h2 {
    font-size: 26px;
    font-weight: 700;
}

.catalog-header .count {
    font-size: 14px;
    color: #888;
}

/* ===============================
   LIST
================================ */
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.catalog-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

.catalog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

/* 텍스트 */
.catalog-card .title {
    font-size: 16px;
    font-weight: 600;
    color: #1a2a44;
}

.catalog-card .meta {
    font-size: 13px;
    color: #777;
    margin-top: 6px;
}

.catalog-card .meta .file {
    display: block;
    word-break: break-all;
}

/* ===============================
   BUTTON
================================ */
.btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.15s ease;
}

.btn.primary {
    background: #2c7be5;
    color: #fff;
}

.btn.primary:hover {
    background: #1a68d1;
}

.btn.detail {
    background: #f1f3f5;
    color: #333;
}

.btn.detail:hover {
    background: #ddd;
}

.catalog-card .actions {
    display: flex;
    gap: 10px;
}

/* ===============================
   EMPTY
================================ */
.empty {
    text-align: center;
    padding: 60px;
    color: #999;
}

/* ===============================
   MOBILE
================================ */
@media (max-width: 768px) {

    .hero {
        height: 160px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .catalog-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .catalog-card .actions {
        width: 100%;
    }

    .catalog-card .actions .btn {
        flex: 1;
        text-align: center;
    }
}
/* ===============================
   EMAIL MODAL
================================ */
.email-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none; /* JS로 flex 처리 */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* 박스 */
.modal-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: modalFade 0.2s ease;
}

/* 애니메이션 */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 제목 */
.modal-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
    color: #1a2a44;
}

/* 입력 */
.modal-box input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.15s ease;
}

.modal-box input:focus {
    border-color: #2c7be5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44,123,229,0.1);
}

/* 버튼 공통 */
.modal-box button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* 인증요청 */
#sendCodeBtn {
    background: #2c7be5;
    color: #fff;
}

#sendCodeBtn:hover {
    background: #1a68d1;
}

/* 인증확인 */
#verifyCodeBtn {
    background: #00a65a;
    color: #fff;
}

#verifyCodeBtn:hover {
    background: #008d4c;
}

/* 취소 */
#cancelBtn {
    background: #eee;
    color: #333;
}

#cancelBtn:hover {
    background: #ddd;
}

/* 버튼 그룹 */
.btn-group {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

/* STEP 영역 */
#step1, #step2 {
    margin-bottom: 12px;
}

/* 비활성 */
.modal-box button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===============================
   MOBILE
================================ */
@media (max-width: 480px) {

    .modal-box {
        max-width: 95%;
        padding: 20px;
        border-radius: 10px;
    }

    .modal-box h3 {
        font-size: 16px;
    }

    .modal-box input {
        padding: 10px;
        font-size: 13px;
    }

    .modal-box button {
        padding: 10px;
        font-size: 13px;
    }
}
/* ===============================
   TOP BAR
================================ */
.catalog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

/* 왼쪽 */
.catalog-top .left h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.catalog-top .count {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ===============================
   SEARCH BOX
================================ */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* input */
.search-box input {
    border: none;
    outline: none;
    padding: 8px 10px;
    width: 220px;
    font-size: 14px;
}

/* select */
.search-box select {
    border: none;
    outline: none;
    padding: 8px;
    font-size: 13px;
    background: #f5f7fa;
    border-radius: 6px;
    cursor: pointer;
}

/* 버튼 */
.search-box button {
    background: #2c7be5;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: #1a68d1;
}

/* ===============================
   반응형
================================ */
@media (max-width: 768px){
	.catalog-card .actions .btn {
        display: flex;
        align-items: center;      /* 세로 가운데 */
        justify-content: center;  /* 가로 가운데 */
        height: 44px;             /* 모바일 터치 영역 */
        font-size: 14px;
        text-align: center;
        padding: 0;               /* 중요: padding 제거 */
    }
    .catalog-top {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 10px;
    }

    .search-box input {
        width: 100%;
    }

    /* 아래 줄 묶기 */
    .search-box .row {
        display: flex;
        gap: 8px;
    }

    .search-box select {
        flex: 1;
    }

    .search-box button {
        flex: 1;
        height: 42px;
    }

}