@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to the top */
    min-height: 100vh;
    margin: 0;
    padding-top: 40px; /* Add padding to the top */
    padding-bottom: 40px; /* Add padding to the bottom */
}

.container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px; /* Increased width for better results display */
    text-align: center;
}

header h1 {
    color: #0056b3;
    font-size: 2rem;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #444;
}

select, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus, input[type="text"]:focus {
    border-color: #0056b3;
    box-shadow: 0 0 8px rgba(0, 86, 179, 0.2);
    outline: none;
}

#search-button {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: #0056b3;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#search-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

#search-button:hover:not(:disabled) {
    background-color: #004494;
    transform: translateY(-2px);
}

.results-container {
    margin-top: 30px;
    text-align: left;
}

.results-container h2 {
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#results-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Accordion Styles */
.accordion-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden; /* Ensures the panel is contained */
}

.accordion-button {
    background-color: #f9f9f9;
    width: 100%;
    padding: 15px;
    text-align: left;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-button:hover, .accordion-button.active {
    background-color: #e9f2fa;
}

.accordion-title-area {
    font-weight: 700;
}

.municipality-badge {
    background-color: #0056b3;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 10px;
}

.accordion-icon::after {
    content: '\25BC'; /* Down arrow */
    font-size: 0.8em;
    transition: transform 0.3s;
}

.accordion-button.active .accordion-icon::after {
    transform: rotate(180deg);
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
    padding: 0 15px;
}

.accordion-panel-content {
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.article-title {
    font-weight: bold;
    color: #333;
}

.article-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    line-height: 1.7;
    color: #444;
}

mark {
    background-color: #ffda79;
    padding: 2px 0;
}

#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
