@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

* {
    font-family: "Pretendard Variable", system-ui;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header {
    text-align: left;
    padding: 20px;
    background-color: #4a90e2;
}

.header h1 {
    font-size: 20px;
    color: white;
}

.container {
    width: 100%;
    height: calc(100vh - 64px);
    background-color: white;

    display: flex;
    flex-direction: column;
    padding: 0px 20px;
    flex-grow: 1;
    overflow: scroll;
}
 
#sections {
    height: 100%;
    padding-top: 40px;
}

#sections div.section:last-child {
    padding-bottom: 108px;
}

.section {
    display: flex;
    flex-wrap: wrap;

    align-items: center;
}

.section:not(:last-child) {
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 12px 0px;
    
    width: calc(100% - 16px);
}

.section-arrow {
    width: 16px;
    transition: transform 0.3s ease;
}

.section-arrow.open {
    transform: rotate(180deg);
}

.question-list {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;

    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 0px 0px 8px 8px;
    padding: 0px 12px;
}

.question-list.open {
    max-height: 500px; /* 충분히 큰 값 설정 */
}

.question-item {
    cursor: pointer;
    padding:12px 0px;
    border-bottom:1px solid #ddd;

    font-size: 14px;
    font-weight: 400;
    color:#333;
    line-height: 1.4;
}

.question-item:last-child {
    border-bottom:none;
}

/* .question-item:hover {
    background-color: #f0f0f0;
} */

.answer-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 5px 0 15px 0;
    background-color: #f9f9f9;
    display: none;
}
.question-content {
    display: none;
    margin: 10px 0 10px 20px;
    font-style: italic;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Navigation */
.navbar {
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: absolute;
    bottom:0;
    left:0;
    padding:20px;
    box-shadow: -2px 0px 20px 0px rgba(0, 0, 0, 0.08);
    /* border:1px solid dodgerblue; */
}

.navbar ul {
    width: 100%;
    list-style-type: none;
    display: flex;
    justify-content: space-around;
}

.navbar li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar a {
    color: #333;
    font-size: 14px;
    margin-top: 8px;
    text-decoration: none;
}

.navbar a.nav-active {
    color: #4B90E2;
    font-size: 14px;
    margin-top: 8px;
}


.navbar img {
    width: 24px;
    height: 24px;
}

.answer-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 5px 0 15px 0;
    background-color: #fafafa; /* Match the background color of question-item */
    display: none; /* Initially hidden */
    color: #333; /* Text color */
}

.answer-item.show {
    display: block; /* Show when this class is added */
}

.answer-item:hover {
    background-color: #f0f0f0; /* Optional: add hover effect similar to question-item */
}

/* Additional optional styles */
.answer-item .answer-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.answer-item .answer-content {
    margin-top: 5px;
}

#loading-message {
    text-align: center;
    font-size: 20px;
    color: #333;
    margin-top: 20px;
}
