@charset "utf-8";

:root{
  --mag-text:#111111;
  --mag-text2:#555555;
  --mag-text3:#8a8a8a;
  --mag-line:#ececec;
  --mag-bg:#ffffff;
  --mag-chip:#f5f5f5;
  --mag-dark:#111111;
  --mag-radius:28px;
  --mag-radius-sm:16px;
  --mag-shadow:0 10px 30px rgba(0,0,0,.06);
}

*{box-sizing:border-box;}

.mag-wrap{
  width:100%;
}

.mag-head{
  margin-bottom:32px;
}

.mag-head-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:22px;
}


.mag-sort{
  display:flex;
  align-items:center;
  gap:10px;
}

.mag-sort-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--mag-line);
  color:var(--mag-text2);
  text-decoration:none;
  font-size:15px;
  font-weight:600;
}

.mag-sort-link.is-active{
  background:#111;
  border-color:#111;
  color:#fff;
}

.mag-cate ul{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:0;
  padding:0;
  list-style:none;
}

.mag-cate li{
  margin:0;
  padding:0;
}

.mag-cate li a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 22px;
  border-radius:999px;
  background:var(--mag-chip);
  color:#5f5f5f;
  text-decoration:none;
  font-size:16px;
  font-weight:700;
  transition:.2s ease;
}

.mag-cate li a:hover{
  background:#ededed;
  color:#111;
}

.mag-cate li #bo_cate_on{
  background:#111;
  color:#fff;
}

.mag-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:24px;
}

.mag-toolbar-left,
.mag-toolbar-right,
.mag-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.mag-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid #111;
  background:#fff;
  color:#111;
  font-size:15px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
}

.mag-btn-dark{
  background:#111;
  color:#fff;
}

.mag-btn-line{
  background:#fff;
  color:#111;
}

.mag-masterchk{
  width:18px;
  height:18px;
  accent-color:#111;
}

.mag-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  margin:0;
  padding:0;
  list-style:none;
}

.mag-item{
  min-width:0;
}

.mag-card{
  position:relative;
  height:100%;
  border-radius:var(--mag-radius);
  overflow:hidden;
  background:var(--mag-bg);
  box-shadow:var(--mag-shadow);
}

.mag-check{
  position:absolute;
  top:18px;
  left:18px;
  z-index:4;
}

.mag-check input{
  width:18px;
  height:18px;
  accent-color:#111;
}

.mag-thumb-link{
  display:block;
  position:relative;
  aspect-ratio: 0.82 / 1;
  overflow:hidden;
  background:#f2f2f2;
}

.mag-card-thumb{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .45s ease;
}

.mag-card:hover .mag-card-thumb{
  transform:scale(1.04);
}

.mag-noimg{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:16px;
  font-weight:700;
  color:#999;
  background:#f4f4f4;
}

.mag-card-body{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:2;
  padding:40px;
  color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.38) 48%, rgba(0,0,0,0) 100%);
}

.mag-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 14px;
  margin-bottom:14px;
  border-radius:999px;
  background:#fff;
  color:#111;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
}

.mag-subject{
  display:block;
  color:#fff;
  text-decoration:none;
  font-size:30px;
  line-height:1.32;
  font-weight:600;
  letter-spacing:-0.03em;
  word-break:keep-all;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.mag-subtitle{
  margin:10px 0 0;
  color:rgba(255,255,255,.88);
  font-size:15px;
  line-height:1.5;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  word-break:keep-all;
}

.mag-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.mag-date{
  color:rgba(255,255,255,.82);
  font-size:14px;
  font-weight:500;
}

.mag-badge-new{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:12px;
  font-weight:600;
}

.mag-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:260px;
  border:1px solid var(--mag-line);
  border-radius:24px;
  background:#fafafa;
  color:#666;
  font-size:16px;
}

.mag-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:28px;
}

.mag-search{
  flex:1;
  min-width:0;
}

.mag-search form{
  display:flex;
  align-items:center;
  gap:10px;
}

.mag-search select{
  width:160px;
  min-height:48px;
  padding:0 14px;
  border:1px solid var(--mag-line);
  border-radius:14px;
  font-size:15px;
  background:#fff;
}

.mag-search-input{
  position:relative;
  flex:1;
}

.mag-search-input input{
  width:100%;
  height:48px;
  padding:0 110px 0 16px;
  border:1px solid var(--mag-line);
  border-radius:999px;
  font-size:15px;
}

.mag-search-input button{
  position:absolute;
  top:50%;
  right:6px;
  transform:translateY(-50%);
  height:36px;
  padding:0 16px;
  border:none;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

.mag-pagination{
  margin-top:28px;
}

.mag-pagination .pg_wrap{
  display:flex;
  justify-content:center;
}

.mag-pagination .pg{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.mag-pagination .pg a,
.mag-pagination .pg strong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:40px;
  padding:0 12px;
  border-radius:999px;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
}

.mag-pagination .pg a{
  background:#f5f5f5;
  color:#555;
}

.mag-pagination .pg strong{
  background:#111;
  color:#fff;
}


.mag-sort-right{
  margin-left:auto;
}

.mag-sort select {
    min-height: 42px;
    padding: 0 16px;
    border: unset;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
  }


  @media (max-width: 768px){
    .mag-wrap{padding: 10px;}
    .mag-btn-dark {
      color:#fff !important;
    }
    .mag-head{
      margin-bottom: 10px;
    }
    /* 상단 정렬 */
    .mag-head-top{
      flex-direction:row;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin-bottom: 0;
    }

    .mag-toolbar{
      flex-direction:row;
      flex-wrap:wrap;
      gap:8px;
      margin-bottom: 10px;
    }

    /* 카테고리 */
    .mag-cate ul{
      gap:6px;
      overflow-x:auto;
      flex-wrap:nowrap;
      padding-bottom:4px;
    }

    .mag-cate li a{
      min-height:36px;
      padding:0 12px;
      font-size:13px;
      white-space:nowrap;
    }

    .mag-grid{
      grid-template-columns:1fr;
      gap:10px;
    }

    /* 썸네일 비율 축소 */
    .mag-thumb-link{
      aspect-ratio: 1 / 1.15;
    }

    /* 카드 내부 */
    .mag-card-body{
      padding:34px;
    }

    /* 칩 */
    .mag-chip{
      min-height:26px;
      padding:0 10px;
      font-size:11px;
      margin-bottom:8px;
    }

    /* 제목 */
    .mag-subject{
      font-size: 28px;
      line-height: 1.3;
      -webkit-line-clamp: 2;
      color: #fff !important;
    }

    /* 부제 */
    .mag-subtitle{
      font-size:12px;
      margin-top:10px;
      -webkit-line-clamp:2;
    }

    /* NEW 뱃지 */
    .mag-badge-new{
      min-height:22px;
      font-size:10px;
      padding:0 8px;
    }

    /* 체크박스 위치 축소 */
    .mag-check{
      top:10px;
      left:10px;
    }

    .mag-check input{
      width:25px;
      height:20px;
    }

    /* 검색 영역 */
    .mag-search form{
      flex-direction:column;
      gap:8px;
    }

    .mag-search select{
      width:100%;
      min-height:42px;
      font-size:14px;
    }

    .mag-search-input input{
      height:42px;
      font-size:14px;
    }

    /* 페이징 */
    .mag-pagination .pg a,
    .mag-pagination .pg strong{
      min-width:34px;
      height:34px;
      font-size:13px;
    }
  }
