/* 메인페이지 -------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar {
  border-top: none;
  border-bottom: none;
}

.logo-header {
  border-top: 4px solid var(--title-color);
  border-bottom: 4px solid var(--title-color);
}

.menu-items {
  width: 70%;
  min-width: 900px;
  margin: 0 auto;
  justify-content: space-between;
}

.menu-item a {
  text-align: center;
  color: #000;
  font-weight: 900;
  font-size: 16px;
}

.menu-item {
  width: initial;
  min-width: 80px;
}

.sub-menu {
  left: 50%;
  transform: translateX(-50%);
}

.section-title:after {
  width: 60px;
}

.right-column .section-title {
  font-size: 22px;
  height: 48px;
  padding-bottom: 6px;
}

.date-info {
  font-size: 13px;
}

/* 주요뉴스 */
.main-text-title h3 {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* 주간 인기 뉴스 */
.pop-title {
  margin: 0;
}

.popular-section .items-wrapper {
  padding-left: initial;
}

.popular-section .popular-news-item:before {
  content: none;
}

.popular-news-content .pop-cat {
  color: var(--title-color);
}

/* 포토뉴스 */
/* photo_news_n_move.php*/
.pn-container>.items-wrapper {
  flex-wrap: wrap;
  flex-direction: inherit;
  gap: .5rem
}

.pn-container>.items-wrapper>.text-list-wrapper {
  display: flex;
  width: calc(100% / 2 - .5rem);
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem
}

.pn-container>.items-wrapper>.text-list-wrapper>.main-text-item {
  width: calc(100% / 3 - .5rem);
  height: auto;
  padding: 0
}

.pn-container>.items-wrapper>.text-list-wrapper>.main-text-item a {
  width: 100%;
  height: 164px;
}

.pn-container>.items-wrapper>.main-news-container {
  width: 50%
}

.pn-container>.items-wrapper>.text-list-wrapper>.main-text-item .text-title {
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

.pn-container>.items-wrapper .main-news-image-wrapper {
  width: 100%;
  height: 100%;
}

.pn-container>.items-wrapper .main-news-image-wrapper>img {
  width: 100% !important
}

.custom-img {
  width: 100%;
  contain-intrinsic-size: revert !important;
  position: inherit;
}

.custom-img~.pn-overlay {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  position: inherit;
  padding: .5rem;
  display: block;
  color: #fff
}

/* photo_news_n_move.php 스타일태그에서 옮겨옴 end*/


.pn-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #f1f1f1;
}

.pn-header:after {
  width: 60px;
}

.pn-title {
  padding-left: initial;
}

.pn-title:before {
  content: none;
}

.pn-container>.items-wrapper .main-news-image-wrapper>img {
  height: 336px !important;
}

/* 인사이트(핫이슈, 연예, 스포츠, 라이프, IT) 섹션 -------------------------------------------- */
.insight-wrap {
  max-width: 1400px;
  margin: 60px auto;
  display: flex;
  gap: 24px;
}

.insight-title {
  width: 100%;
  font-weight: 700;
  margin-bottom: 12px;
}

.insight-title a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  justify-content: space-between;
}

.insight-title a::after {
  content: '→';
  font-size: 20px;
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.insight-title a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.insight-title .title-text {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.insight-title .title-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: #0182d6;
}

/* 이미지 공통 안정화 */
.insight-wrap img {
  max-width: 100%;
  height: auto;
  contain-intrinsic-size: unset !important;
}

/* 핫이슈 */
.insight-hot {
  width: 50%;
  padding: 14px;
}

.insight-hot,
.insight-cat {
  border-radius: 8px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.insight-hot .item:not(:last-child) {
  margin-bottom: 33px;
}

.insight-hot img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}

.insight-hot .title {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
}

.insight-hot .title a {
  color: #000;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}

/* 핫이슈 썸네일 + 기사요약 가로 정렬 */
.insight-hot .body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.insight-hot .thumb {
  flex: 0 0 120px;
  /* 썸네일 고정 폭 */
}

.insight-hot .thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.insight-hot .excerpt {
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.insight-hot .excerpt a {
  color: #000;
}

.insight-cats {
  width: 50%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.insight-cat {
  padding: 14px;
  border-radius: 6px;
}

.insight-cat ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.insight-cat li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  margin-left: initial;
}

.insight-cat li:last-of-type {
  margin-bottom: initial;
}

.insight-cat li a:first-child {
  display: block;
  flex: 0 0 72px;
  height: 54px;
}

.insight-cat img {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
}

.insight-cat .title {
  font-size: 14px;
  line-height: 1.4;
  color: #222;
}

.insight-hot .item,
.insight-cat li {
  transition:
    background-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.insight-hot .thumb,
.insight-cat li a:first-child {
  overflow: hidden;
  border-radius: 6px;
}

.insight-hot .thumb img,
.insight-cat img {
  transition: transform .3s ease;
}

.insight-hot .item:hover {
  background-color: #f9fbff;
  transform: translateY(-2px);
}

.insight-hot .item:hover .thumb img {
  transform: scale(1.1);
}

.insight-hot .item:hover .title a {
  color: #0182d6;
}


.insight-cat li:hover img {
  transform: scale(1.1);
}

.insight-cat li:hover .title {
  color: #0182d6;
}

/* 많이 본 뉴스 */
.most-viewed-header {
  margin-bottom: 2rem;
}

.most-viewed-title {
  font-size: 22px;
}

.most-viewed-title:after {
  bottom: -10px;
}

.most-viewed-title:before {
  content: none;
}

/* 많이 본 뉴스 카드 5개만 */
.most-viewed-card:nth-child(6) {
  display: none;
}


/* 메인페이지 -------------------------------------------- */
.category-header {
  padding-left: initial;
  margin-bottom: 1rem;
}

.category-header::after {
  content: none;
}

.category-header::before {
  content: none;
}

.category-header h2 {
  color: #222;
  font-weight: 600;
}

.category-header h2 a {
  font-size: 22px;
}

.category-header h2::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #eaeaea;
}

.category-header h2::after {
  margin-right: 5px;
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 30px;
  height: 3px;
  background-color: var(--title-color);
}

.category-header a:after {
  font-weight: bold;
  font-size: 2rem;
}

.news-wrapper {
  margin: 0 auto;
}

.custom-box .category-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-item {
  width: 100%;
  box-shadow: none;
  border: none;
}

.category-section .category-item {
  width: 100% !important;
}


/* 기본 구조 */
.articles-container {
  display: flex;
  flex-direction: column;
  padding-top: initial;
}

.article-item {
  display: flex;
}

.article-item:first-of-type {
  flex-direction: column;
}

.article-item:hover {
  background: none;
}

.article-item>div {
  min-height: 84px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.article-item div {
  width: 100%;
}

.article-item:hover .image-container img {
  transform: scale(1.1);
}

.article-text a {
  font-size: 16px;
  font-weight: 900;
}

.article-date {
  font-size: .8rem;
  margin-top: 0;
}

.image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: none;
}

.image-container img {
  object-fit: cover;
  object-position: center;
}

.articles-container .article-item:not(:first-child) .image-container {
  display: none;
}

/* 숨길 때 텍스트 영역 확장 */
.articles-container .article-item:not(:first-child)>div {
  flex: 1;
}

/* footer 디자인 수정  -------------------------------------------- */
.hd-magazine-footer {
  background: #000;
  padding: 60px 0 0;
}

.hd-magazine-footer .hd-footer-info a {
  color: rgba(255, 255, 255, .9);
}

.hd-footer-container {
  text-align: center;
  max-width: 1400px;
}

.hd-footer-top {
  flex-direction: column;
  padding-bottom: 20px;
  margin-bottom: 8px;
}

/* 로고 영역 */
.hd-footer-logo-container {
  margin-bottom: 20px;
}

.hd-footer-logo-container .logo-link {
  display: inline-block;
}

.hd-footer-logo-container img {
  width: 15%;
  height: initial;
}

.hd-footer-nav {
  gap: 30px 45px;
  width: 100%;
}

.hd-footer-nav ul {
  display: flex;
  width: 100%;
  gap: 20px;
  justify-content: center;
}

.hd-footer-nav>li {
  position: relative;
}

.hd-footer-nav>li>a {
  display: block;
}

.hd-footer-nav>li>ul {
  display: none;
  /* 1번 스타일은 서브메뉴 안 보이게 */
}

/* 회사 정보 영역 */
.hd-footer-info {
  color: #777;
  font-size: 13px;
  line-height: 2;
  margin-top: 0;
  margin-bottom: 40px;
}

.hd-footer-company {
  margin-bottom: 10px;
  display: inline-block;
  width: 100%;
}

.hd-footer-company span {
  position: relative;
  padding: 0 10px;
}

.hd-footer-company span:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: #ccc;
}

/* 주소, 사업자명 등 한 줄씩 */
.hd-footer-company span {
  white-space: nowrap;
}

/* DMCA 배지 & 카피라이트 */
.hd-copyright {
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  border-top: 1px solid #eee;
  margin-top: 0;
}

.dcma_badge a {
  display: flex;
  justify-content: center;
}

.dcma_badge a img {
  width: 20%;
}

/* footer 디자인 수정  -------------------------------------------- */
/* 카테고리별 페이지 임시*/
.news-left {
  height: 150px;
}

/* 카테고리별 페이지 */

@media (max-width: 1280px) {

  /* 
  주요뉴스, 주간 인기 뉴스
  포토뉴스
  인사이트(카테고리 5개)
  많이 본 뉴스
  카테고리
  넓이 95%
  */
  .news-layout-container,
  .pn-container,
  .insight-wrap,
  .most-viewed-wrapper,
  .category-section {
    width: 95%;
    margin: 2rem auto 2rem;
  }

  /* 주요뉴스 */
  .main-text-item {
    flex-wrap: initial;
  }

  .main-text-item>div:first-child {
    width: 10%;
  }

  .main-text-item>div:nth-child(2) {
    width: 100%;
  }

  .main-text-item {
    justify-content: initial;
  }

  /* 많이 본 뉴스 */
  .most-viewed-wrapper {
    padding: initial;
  }

}

@media (max-width: 1280px) {

  /* 많이 본 뉴스 */
  /* 많이 본 뉴스 카드 6개 */
  .most-viewed-card:nth-child(6) {
    display: block;
  }
}

@media (max-width: 1024px) {

  /* 주간 인기 뉴스 */
  .popular-news-content {
    flex: initial;
  }

  .popular-section .popular-news-item {
    justify-content: initial;
    width: 100%;
  }

  .container {
    margin: initial;
  }

  .main-nav>.container {
    width: initial;
  }

  .menu-item {
    min-width: initial;
  }

  .menu-item a {
    min-width: 60px;
    width: initial;
  }

  /* 포토뉴스 */
  /* photo_news_n_move.php 스타일태그에서 옮겨옴 end*/
  .trendy-magazine-header {
    overflow: hidden
  }

  .content-row {
    display: flex
  }

  .isu .custom>.items-wrapper {
    width: 100%;
    flex-wrap: wrap;
  }

  .isu .custom .main-news-container,
  .isu .custom .text-list-wrapper {
    width: 100%
  }

  .pn-container>.items-wrapper>.text-list-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    width: calc(50% - .5rem);
  }

  .pn-container>.items-wrapper>.text-list-wrapper>.main-text-item {
    width: auto;
    padding: 0;
    height: auto;
  }

  .pn-container>.items-wrapper>.text-list-wrapper>.main-text-item:nth-child(n+5) {
    display: none;
  }

  .pn-container>.items-wrapper>.text-list-wrapper .img-box {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
  }

  .pn-container>.items-wrapper>.text-list-wrapper img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
  }

  .custom-img {
    width: 100%;
    contain-intrinsic-size: auto 100px !important;
    height: 120px;
    position: relative;
    top: 0;
  }

  .custom-main-banner {
    padding: 0 .5rem
  }

  .custom-img~.pn-overlay {
    padding: .2rem;
  }

  /* photo_news_n_move.php 스타일태그에서 옮겨옴 end*/
  .pn-container>.items-wrapper {
    align-items: initial;
  }

  /* 인사이트 (핫이슈, 연예, 스포츠, 라이프, IT) 섹션 */
  .insight-wrap {
    flex-direction: column;
  }

  .insight-hot,
  .insight-cats {
    width: 100%;
  }
}


@media (max-width: 768px) {

  /* 메인페이지 */
  .logo-area {
    text-align: center;
  }

  .top-bar-content {
    justify-content: flex-end;
  }

  /* 주요뉴스 */
  .text-box {
    text-wrap: initial;
  }

  .main-news-content {
    padding: 8px;
  }

  .isu .custom .main-text-item {
    margin-bottom: 12px;
  }

  .main-text-item {
    flex-wrap: wrap;
    gap: initial;
  }

  .main-text-item>div:nth-child(2) {
    padding: initial;
    flex: 1 0 auto;
  }

  .main-text-item>div:first-child {
    width: auto;
    text-align: initial;
  }

  .main-text-item>div:last-child {
    margin-left: auto;
  }


  /* 주간 인기 뉴스 */
  .popular-news-content .pop-title>a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .popular-section .items-wrapper .popular-news-item {
    width: 100%;
  }

  /* 포토뉴스 */

  .pn-container>.items-wrapper {
    flex-direction: column;
  }

  .pn-container>.items-wrapper>.text-list-wrapper,
  .pn-container>.items-wrapper>.main-news-container {
    width: 100%;
  }

  .pn-container>.items-wrapper>.text-list-wrapper>.main-text-item {
    width: auto !important;
  }

  /* 인사이트 (핫이슈, 연예, 스포츠, 라이프, IT) 섹션 */
  .insight-hot .title a {
    white-space: initial;
  }

  .news-wrapper {
    padding: 0 8px;
  }

  /* 카테고리 섹션 (768px 이하 → 2단) */
  .custom-box .category-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .most-viewed-wrapper {
    padding: 0 calc(.5rem + 8px);
  }

  /* 포토뉴스 */
  .pn-header {
    padding: 0;
  }

  /* 기사 상세 페이지 -------------------------------------------- */
  .wpb_wrapper[data-sticky-enabled-on] {
    position: relative !important;
    top: 0 !important;
  }

  /* footer 디자인 수정 */
  .hd-footer-nav {
    gap: 20px 30px;
    font-size: 14.5px;
  }

  .hd-footer-nav ul {
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .hd-footer-nav a {
    font-size: 14px;
  }

  .hd-footer-company {
    display: flex;
  }

  .hd-footer-company span {
    display: block;
    padding: 4px 0;
    white-space: normal;
    word-break: keep-all;
  }

  .hd-footer-company span:not(:last-child)::after {
    display: none;
  }

  .hd-magazine-footer {
    padding: 40px .5rem 0;
  }

  .hd-footer-top {
    gap: 0;
  }

  /* footer 디자인 수정 */

}

@media (max-width: 768px) {

  /* 인사이트 (핫이슈, 연예, 스포츠, 라이프, IT) 섹션 */
  .insight-cats {
    grid-template-columns: 1fr;
  }

  /* 카테고리 별 */
  /* 768px 이하 1단 */
  .custom-box .category-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .custom-box .category-section {
    gap: initial
  }
}

@media (max-width: 480px) {

  /* 카테고리 별 */
  .article-text {
    margin-left: 0;
  }

  /* footer 디자인 수정 */
  .hd-footer-container {
    padding: 0;
  }

  .hd-footer-logo-container {
    margin-bottom: 0;
  }

  .hd-footer-logo-container img {
    width: initial;
    height: 30px;
  }

  .hd-footer-top {
    padding-bottom: 10px;
  }

  .hd-footer-nav {
    gap: 10px;
  }

  .hd-footer-nav a {
    font-size: 12px;
  }

  .hd-footer-nav>li>a {
    font-size: 13px;
  }

  .hd-footer-company {
    gap: 0;
    margin-bottom: 0;
  }

  .hd-magazine-footer .hd-footer-container .hd-footer-info .hd-footer-company span {
    padding: 2px 0;
    line-height: 1.4;
    font-size: 11px;
  }

  .hd-copyright {
    gap: 0;
    padding-top: 10px;
    border-top: none;
  }

  .dcma_badge a img {
    width: 30%;
    margin-bottom: 8px;
  }

  .hd-footer-warning {
    font-size: .8em;
  }

  .hd-social-links {
    gap: 8px;
  }

  /* footer 디자인 수정 */
}

/* KpopPost-style typography scale override */
.main-nav .menu-item a {
  font-size: 16px !important;
  line-height: 1.25 !important;
}

.section-title,
.pn-title,
.most-viewed-title,
.category-header h2,
.category-header h2 a,
.latest-section .section-title,
.pn-header .pn-title,
.most-viewed-header .most-viewed-title,
.middle-column .section-title,
.right-column .section-title {
  font-size: 20px !important;
  line-height: 1.3 !important;
}

.article-text a,
.main-text-title,
.pn-container>.items-wrapper>.text-list-wrapper>.main-text-item .text-title,
.insight-hot .title {
  font-size: 16px;
  line-height: 1.45;
}

.insight-cat .title {
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 1140px) {
  .main-nav .menu-item a {
    font-size: 14px !important;
  }

  .section-title,
  .pn-title,
  .most-viewed-title,
  .category-header h2,
  .category-header h2 a,
  .latest-section .section-title,
  .pn-header .pn-title,
  .most-viewed-header .most-viewed-title,
  .middle-column .section-title,
  .right-column .section-title {
    font-size: 19px !important;
  }
}

@media (max-width: 767px) {
  .main-nav .menu-item a {
    font-size: 13px !important;
  }

  .section-title,
  .pn-title,
  .most-viewed-title,
  .category-header h2,
  .category-header h2 a,
  .latest-section .section-title,
  .pn-header .pn-title,
  .most-viewed-header .most-viewed-title,
  .middle-column .section-title,
  .right-column .section-title {
    font-size: 18px !important;
  }

  .article-text a,
  .main-text-title,
  .pn-container>.items-wrapper>.text-list-wrapper>.main-text-item .text-title,
  .insight-hot .title {
    font-size: 15px;
  }

  .insight-cat .title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .main-nav .menu-item a {
    font-size: 12px !important;
  }

  .section-title,
  .pn-title,
  .most-viewed-title,
  .category-header h2,
  .category-header h2 a,
  .latest-section .section-title,
  .pn-header .pn-title,
  .most-viewed-header .most-viewed-title,
  .middle-column .section-title,
  .right-column .section-title {
    font-size: 17px !important;
  }

  .article-text a,
  .main-text-title,
  .pn-container>.items-wrapper>.text-list-wrapper>.main-text-item .text-title,
  .insight-hot .title {
    font-size: 14px;
  }

  .insight-cat .title {
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .main-nav>.container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu-items {
    width: 100%;
    min-width: 600px;
    justify-content: space-between;
    gap: 0;
    padding: 0 4px;
  }

  .menu-item {
    /* min-width: 72px; */
    flex: 0 0 auto;
  }

  .main-nav .menu-item a {
    font-size: 16px !important;
    padding: 16px 6px;
    min-width: 56px;
    white-space: nowrap;
  }
}

/* ============================================================
   모바일 헤더 메뉴 / 버튼 개선 (Phase 3+)
   - newspaper.min.css 의 #mobile-menu-btn{display:none!important} 충돌 해소
   - 햄버거 → X 모핑
   - 백드롭, 2뎁스 아코디언, a11y
   ============================================================ */

/* 1) 1024px 이하에서 햄버거 버튼 강제 노출 (newspaper.min.css 의 !important 충돌 해소) */
@media (max-width: 1024px) {
  #mobile-menu-btn-box #mobile-menu-btn,
  #mobile-menu-btn-box.sticky #mobile-menu-btn {
    display: flex !important;
  }

  /* 로고 정확한 가운데 정렬 — 햄버거를 absolute 로 빼서 flow 에서 제외 */
  .logo-header > .container {
    position: relative;
  }
  #mobile-menu-btn-box:not(.sticky) {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    margin: 0;
  }
  .logo-area {
    flex: 1 1 100%;
    text-align: center !important;
  }
  .logo-area .logo-link {
    /* 버튼 너비만큼 시각적 보정 (가운데 정렬 흔들림 방지) */
    margin: 0 auto;
  }

  /* 햄버거 라인 색상 — 흰 배경 위에서 보이게 검정으로 (sticky 둥근 버튼은 제외 — 그쪽은 검은 배경 유지) */
  #mobile-menu-btn-box:not(.sticky) .mobile-menu-btn span {
    background-color: #000;
  }
}

/* 2) 햄버거 → X 모핑 (active 상태) */
.mobile-menu-btn span {
  transform-origin: center;
  transition: transform .25s ease, opacity .2s ease, background-color .2s ease;
}
.mobile-menu-btn.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 3) 모바일 메뉴 백드롭 */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 99999; /* mobile-menu(100000) 바로 아래 */
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-menu-backdrop.active {
  opacity: 1;
}

/* 4) 모바일 메뉴 본체 마이너 보강 (사파리 노치 + iOS 스크롤) */
.mobile-menu {
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-menu .mobile-menu-content {
  padding: 0 16px 24px;
}

/* 5) 카테고리 행 / 토글 버튼 (2뎁스 아코디언) */
.mobile-category-list .has-children > .cat-row,
.mobile-category-list li > .cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.mobile-category-list .cat-row > .cat-link {
  flex: 1 1 auto;
  border-bottom: none;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: 14px;
  padding: 12px 0;
  transition: color .2s ease, padding-left .2s ease;
}
.mobile-category-list .cat-row > .cat-link:hover {
  color: #fff;
  padding-left: 4px;
}
.mobile-category-list li.has-children > .cat-row {
  /* 부모 li 의 기본 border-bottom 제거 (cat-row 가 담당) */
}
.mobile-category-list li.has-children {
  border-bottom: none;
}

/* 토글 버튼 (▼) */
.mobile-category-list .submenu-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .85);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .2s ease, transform .25s ease;
}
.mobile-category-list .submenu-toggle:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.mobile-category-list .submenu-toggle i {
  transition: transform .25s ease;
}
.mobile-category-list .submenu-toggle.is-open i {
  transform: rotate(180deg);
}

/* 2뎁스 서브메뉴 */
.mobile-category-list .mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 14px;
  border-left: 2px solid var(--primary-color, #ff3b3b);
  margin-left: 2px;
  background: rgba(255, 255, 255, .02);
}
.mobile-category-list .mobile-submenu li {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.mobile-category-list .mobile-submenu li:last-child {
  border-bottom: none;
}
.mobile-category-list .mobile-submenu a {
  display: block;
  padding: 10px 0 10px 6px;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-size: 13px;
  transition: color .2s ease, padding-left .2s ease;
}
.mobile-category-list .mobile-submenu a:hover {
  color: #fff;
  padding-left: 12px;
}

/* 6) 닫기 버튼 가시성 보강 */
.mobile-menu-header .close-menu {
  font-size: 20px;
}
.mobile-menu-header .close-menu:focus-visible {
  outline: 2px solid var(--primary-color, #ff3b3b);
  outline-offset: 2px;
}

/* 7) 햄버거 버튼 포커스 가시성 */
.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--primary-color, #ff3b3b);
  outline-offset: 3px;
}

/* 모바일 메뉴 날씨: "불러오는 중…" → 실제 텍스트 교체 시 시프트 방지 */
.mobile-weather {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-weather span {
  display: inline-block;
  min-width: 140px;
}

/* 로고 CLS 안전망: 공간만 예약, 표시 크기는 부모 컨테이너가 그대로 결정 */
.shared-theme-logo {
  aspect-ratio: 1000 / 297;
  height: auto;
  max-width: 100%;
}

/* ===== 접근성(A11Y) 보정 — Lighthouse 색 대비 / 터치 영역 ===== */

/* 색 대비 (WCAG AA 4.5:1 이상) — 옅은 회색 텍스트 어둡게 */
.main-text-category,
.popular-news-content .pop-cat {
  color: #444;
}

.post-date,
.main-text-item .post-date {
  color: #555;
}

/* 푸터 링크: 어두운 배경 위 충분한 대비 + 터치 영역 24px */
.hd-magazine-footer .footer-nav-link,
.hd-magazine-footer .hd-footer-company a {
  color: #e6e6e6;
  display: inline-block;
  padding: 6px 4px;
  min-height: 24px;
  line-height: 1.4;
}

.hd-magazine-footer .footer-nav-link:hover,
.hd-magazine-footer .footer-nav-link:focus,
.hd-magazine-footer .hd-footer-company a:hover,
.hd-magazine-footer .hd-footer-company a:focus {
  color: #fff;
  text-decoration: underline;
}

/* 푸터 카테고리 메뉴 터치 간격 */
.hd-magazine-footer .footer-category-list a {
  display: inline-block;
  padding: 6px 8px;
  min-height: 24px;
  line-height: 1.4;
}

/* 카드 링크 터치 영역 보강 (인기뉴스/카테고리 리스트) */
.popular-news-item > a,
.news-layout-container.isu a.news-layout-link {
  min-height: 44px;
}
