body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 50px;
    background-color: #f7faff;
    padding-top: 10px;  /* ✅ 네비게이션과 내용이 겹치지 않도록 추가 */
}

.navbar {
    position: fixed;  /* ✅ 화면 상단에 고정 */
    top: 0;  /* ✅ 최상단 위치 */
    left: 0;
    width: 100%;  /* ✅ 전체 너비 차지 */
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #e3f2fd;
    border-bottom: 2px solid #b0d4f1;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;  /* ✅ 다른 요소보다 위로 */
}

/* 🔹 "다파변"과 "홈"을 왼쪽 정렬 */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px; /* 🔹 제목과 홈 간격 */
}

/* 🔹 "다파변"은 크기 키우기 */
.logo {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

/* 🔹 "홈" 스타일 */
.nav-home {
    font-size: 18px;
    font-weight: bold;
    color: #004080;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

/* 🔹 "홈" 호버 효과 */
.nav-home:hover {
    background: #cce7ff;
}

.sub-text {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.container {
    max-width: 70%;
    margin: 20px auto;
    padding: 20px;
    overflow-x: hidden;
}


/* 🔹 아코디언 버튼 스타일 */
.accordion {
    background-color: #dbeeff;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: 0.4s;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;  /* 🔥 왼쪽(텍스트) + 오른쪽(아이콘) 정렬 */
    align-items: center;
    color: #004080;
    padding-right: 20px;  /* 🔥 오른쪽 여백 추가 */
}

/* ✅ 방향키(↓, ↑) 문제 해결: `::after`를 제거 */
.accordion::after {
    content: "";  /* 🔥 방향키 제거 */
}

/* 🔹 패널 기본 스타일 */
.panel {
    display: none;
    overflow-x: hidden;  /* ✅ 가로 스크롤이 아닌 자동 줄바꿈 적용 */
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* ✅ 넘치면 자동 조정 */
    gap: 15px;
    justify-content: center; /* ✅ 가운데 정렬 */
    align-items: flex-start;
    max-width: 100%; /* ✅ 부모 컨테이너의 너비를 초과하지 않도록 설정 */
    padding-bottom: 20px; /* ✅ 여백 추가 (스크롤 여유) */
}

/* ✅ 패널이 열릴 때만 `display: grid` 적용 */
.panel.open {
    display: grid;  
}

/* 🔹 변환 카드 스타일 */
.conversion-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 140px;
    height: 160px;
    transition: all 0.3s ease;
    position: relative;
    color: #004080;
    flex: 0 0 auto;
    border: 2px solid transparent;
    cursor: pointer;
}

.conversion-card:hover {
    transform: translateY(-5px);
    border: 2px solid #007bff;
    background: #e3f2fd;
    z-index: 10;
}

.conversion-card img {
    width: 40px;
    margin-bottom: 10px;
    content: url('/assets/icons/default.png');
}

.conversion-card h3 {
    font-size: 14px;
    margin: 10px 0;
    font-weight: bold;
    color: #002b5c;
}

.conversion-card p {
    font-size: 12px;
    color: #555;
}

/* 🔹 방향키(↓, ↑) 위치 조정 */
.accordion .arrow {
    margin-left: auto;  /* 🔥 오른쪽으로 정렬 */
    font-size: 18px;
    color: #007bff;
    transition: transform 0.3s ease;
}

@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .convert-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .accordion {
    width: 100%;
    padding: 16px;
    margin: 0;
    border-radius: 0;
    box-sizing: border-box;
    background-color: #dbeeff;
    font-size: 18px;
  }

  /* ✅ 패널 기본 상태는 닫힘 */
  .panel {
    display: none !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ✅ 열릴 때만 grid 적용 */
  .panel.open {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    justify-content: center;
    box-sizing: border-box;
  }

  .conversion-card {
    width: 100%;
    max-width: 100%;
    padding: 16px 0;
    border-bottom: none;
    border-radius: 10px;
    box-sizing: border-box;
  }
}
