* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
  color: #333;
  padding-top: 60px;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}
header {
  color: rgb(0, 0, 0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.387); 
  position: fixed;
  top: 0;
  background-color: #fff;
  width: 100%;
  height: 60px;
  z-index: 1000;
  display: flex;
}
header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}
header h1 a {
  font-size: 1.8rem;
  font-weight: bold;
}





/* Hero 영역 - 핫 뉴스 슬라이더 */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 400px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}
.slide {
  width: 100%;
  height: 400px;
  position: absolute;
  top: 0;
  left: 100%;
  opacity: 0;
  transition: all 0.8s ease;
  background-size: cover;
  background-position: center;
}
.slide.active {
  left: 0;
  opacity: 1;
}
.slide-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(0,0,0,0.6);
  padding: 20px;
  border-radius: 5px;
  color: #fff;
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  padding: 10px 0;
  gap: 12px;
  scroll-behavior: smooth;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE, Edge */
}

.category-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.category-item {
  flex: 0 0 auto;
  min-width: 100px;
  background-color: #d1d1d1;
  text-align: center;
  border-radius: 10px;
  padding: 5px;
  margin: 0 5px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

/* 카테고리 뉴스 섹션 */
.category-section {
  margin-bottom: 40px;
}
.category-section h2 {
  margin-bottom: 20px;
  padding-left: 10px;
  border-left: 4px solid #004080;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.news-card:hover {
  transform: translateY(-5px);
}
.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.news-card .card-body {
  padding: 0 15px 15px 15px;
}
.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  padding: 0 0.5em;
}
.news-card p {
  font-size: 0.9rem;
  color: #666;
  padding: 0 0.5em;
}

.news-item {
  margin-bottom: 20px;
}

.news-content {
  display: flex;
  gap: 10px;
}
.news-detail-content{
  display: flex;
  flex-direction: column;
}

.news-thumb {
  width: 20%;
  padding: 1em;
}

.news-thumb img {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  max-height: 120px;
}

.news-text {
  width: 80%;
  padding: 1em;
}

.news-divider {
  height: 2px;
  width: 100%;
  margin-top: 10px;
  padding:0 0.5em;
}
.news-divider-bar{
  background-color: #ddd;
  width: 100%;
  height: 100%;
}
/* 뉴스 타입별 섹션 */
/* 뉴스 타입별 섹션 카드타입 */
.news-2div-thumb {
  width: 50%;
  padding: 1em;
}

.news-2div-thumb img {
  width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  max-height: 200px;
}

.news-2div-text {
  width: 50%;
  padding: 1em;
}
/* 뉴스 타입별 섹션 이미지없는타입 */
/* 뉴스 타입별 섹션 이미지없는타입 */
/* 추천/인기 뉴스 섹션 */
.side-panel {
  background: #fff;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.side-panel h3 {
  margin-bottom: 15px;
  border-bottom: 2px solid #004080;
  padding-bottom: 5px;
}
.side-panel ul {
  list-style: none;
}
.side-panel ul li {
  margin-bottom: 10px;
}
.side-panel ul li a {
  color: #004080;
  font-weight: bold;
  font-size: 0.95rem;
}
/* 메인 레이아웃 */
main {
  flex-wrap: wrap;
  gap: 20px;
}
.main-content {
  flex: 3;
}
.sidebar {
  flex: 1;
}
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  margin-top: 20px;
}
footer p {
  font-size: 0.9rem;
}
.pd-lr-0-5em{padding-left: 0.5em;padding-right: 0.5em;}
.pd-lr-1em{padding-left: 1em;padding-right: 1em;}
.pd-lr-1-5em{padding-left: 1.5em;padding-right: 1.5em;}
.pd-lr-2-em{padding-left: 2em;padding-right: 2em;}
.wd-10{width:10%;}
.wd-20{width:20%;}
.wd-25{width:25%;}
.wd-30{width:30%;}
.wd-40{width:40%;}
.wd-50{width:50%;}
.wd-60{width:60%;}
.wd-70{width:70%;}
.wd-75{width:75%;}
.wd-80{width:80%;}
.wd-90{width:90%;}
.wd-100{width:100%;}
.mx-h-2{display:-webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;}
.mx-h-4{display:-webkit-box;-webkit-line-clamp: 4;-webkit-box-orient: vertical;overflow: hidden;}
.mx-h-6{display:-webkit-box;-webkit-line-clamp: 6;-webkit-box-orient: vertical;overflow: hidden;}
.mx-h-8{display:-webkit-box;-webkit-line-clamp: 8;-webkit-box-orient: vertical;overflow: hidden;}
.mx-h-10{display:-webkit-box;-webkit-line-clamp: 10;-webkit-box-orient: vertical;overflow: hidden;}
.dflex{
  display: flex;
}
.dflex-row{
  display: flex;
  flex-direction: row;
  align-items: center;
}
.dflex-wrap{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.dflex-column{
  display: flex;
  flex-direction: column;
}
.dflex-row-start{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
.submit-button {
  padding: 4px;
  min-width: 100px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.save-a-button {
  padding: 4px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.back-a-button {
  padding: 4px;
  background: #969696;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cancel-a-button {
  padding: 4px;
  background: #ff1100;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.input-group {
  margin-bottom: 20px;
}
.input-group input[type="date"]{
  padding-top: 12px;
  padding-left:0.5em;
  padding-right:0.5em;
  padding-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.input-group textarea,
.input-group select,
.input-group input[type="number"],
.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"] {
  width: 100%;
  padding-top: 12px;
  padding-left:0.5em;
  padding-right:0.5em;
  padding-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
/*nav bar 설정 여기에 추가*/
/* ---------------------- 메뉴 관련 CSS ---------------------- */
.nav-container {
  max-width: 1200px;
  top: 0;
  margin: 0 auto;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 0 20px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

    .logo {
      font-size: 1.5rem;
      font-weight: bold;
      display: flex;
      align-items: center;
    }

    .menu-toggle {
      font-size: 24px;
      background: none;
      border: none;
      cursor: pointer;
      display: none;
    }

    .nav-menu {
      display: flex;
      list-style: none;
      gap: 20px;
    }

    .nav-item {
      position: relative;
    }

    .nav-link {
      text-decoration: none;
      color: #000;
      font-weight: 500;
      padding: 10px;
      display: block;
    }

    .dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background: white;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      list-style: none;
      padding: 0;
      z-index: 999;
      min-width: 120px;
    }

    .dropdown li a {
      display: block;
      padding: 10px;
      color: #333;
      text-decoration: none;
      white-space: nowrap;
    }

    .dropdown li a:hover {
      background-color: #f0f0f0;
    }
    .arrow-icon {
      display: inline-block;
      transition: transform 0.3s ease;
    }
    /* PC: hover시 드롭다운 */
    @media (min-width: 769px) {
      .nav-item.has-dropdown:hover .dropdown {
        display: block;
      }
    }

    /* 모바일용 스타일 */
    @media (max-width: 768px) {
      .menu-toggle {
        display: block;
        margin-left: auto;
      }

      .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ccc;
        gap:0;
      }

      .nav-menu.show {
        display: flex;
      }

      .dropdown {
        position: static;
        box-shadow: none;
        border-top: 1px solid #eee;
      }
      .nav-item{
        background-color: #f7f7f7;
      }
      .nav-item ul li{
        background-color: #f7f7f7;
      }
      .nav-item.open .dropdown {
        display: block;
      }

      .nav-link {
        padding: 12px 16px;
      }

      .dropdown li a {
        padding-left: 24px;
      }
    }
/* ---------------------------------------------------------- */


/*nav bar 설정*/

@media (max-width: 768px) {
  main {
    flex-direction: column;
  }
  


  .header-container {
    padding: 0 20px;
  }
  .news-content {
    flex-direction: column;
  }

  .news-thumb,
  .news-text {
    width: 100%;
    padding: 0.5em 1em;
  }

  .news-thumb img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 10px;
  }
  .news-2div-thumb {
    width: 100%;
    padding: 1em;
  }
  

  
  .news-2div-text {
    width: 100%;
    padding: 1em;
  }
.wd-10,
.wd-20,
.wd-25,
.wd-30,
.wd-40,
.wd-50,
.wd-60,
.wd-70,
.wd-75,
.wd-80,
.wd-90,
.wd-100{width:100%;}
.dflex-row{
  display: flex;
  flex-direction: column;
}

.dflex-row-start{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

}