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

/* --- CSS Variables (테마 색상) --- */
:root {
    --bg-color: #f4f7f6;
    /* 전체 배경색 */
    --primary-color: #5a7d7c;
    /* 차분한 녹색 계열 */
    --accent-color: #ff7f50;
    /* 포인트 컬러 (코랄) */
    --text-color: #333333;
    /* 기본 글자색 */
    --card-bg-color: #ffffff;
    /* 카드 배경색 */
    --border-radius: 12px;
    /* 둥근 모서리 */
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 그림자 효과 */
}

/* --- Basic Reset & Body Style --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-width: 500px;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

/* --- Header --- */
header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    padding: 40px 0;
    color: var(--primary-color);
}

/* --- Navigation & Login Form --- */
#navi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

#navi h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

#navi form {
    display: flex;
    gap: 10px;
}

#navi form input {
    width: 150px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#navi form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 125, 124, 0.2);
}

#navi form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

#navi form button:hover {
    background-color: #e66a3e;
}

/* --- Main Content (Bento Grid) --- */
#index>p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: orangered;
}

#index>ol {
    list-style: none;
    display: grid;
    /* 카드를 자동으로 채우고, 최소 300px 너비를 보장하는 반응형 그리드 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

#index>ol>li {
    background-color: var(--card-bg-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

#index>ol>li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

#index>ol>li>strong {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-color);
    display: block;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

#index ul {
    list-style: none;
}

#index ul li {
    margin-bottom: 8px;
}

#index ul a {
    font-size: 1rem;
    display: inline-block;
    /* 링크 영역 확장 */
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid #e0e0e0;
    color: #777;
    font-size: 0.9rem;
}

footer div,
footer address {
    font-style: normal;
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    #navi {
        flex-direction: column;
        gap: 15px;
    }
}

#ani-chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 90px;
    z-index: 9990;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

#ani-chatbot-widget img {
    width: 100%;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#ani-chatbot-widget:hover {
    transform: translateY(-5px) scale(1.1);
}

.chat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(167, 191, 232, .7) 0%, rgb(97, 144, 232, .9) 100%);
    color: #fff;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.chat-modal-overlay.show {
    display: flex;
}

.chat-modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 380px;
}

.ani-logo-absolute {
    position: absolute;
    top: -35px;
    left: -5px;
    height: 90px;
    pointer-events: none;
    z-index: 10002;
}

.chat-modal-content {
    background: linear-gradient(180deg, #edf2f9 0%, #e0e6ed 100%);
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 80vh;
    max-height: 600px;
}

.chat-header {
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #fff;
    height: 60px;
    padding: 0 15px 0 25px;
    cursor: move;
    flex-shrink: 0;
}

.chat-header .header-text {
    font-size: 1.2em;
    font-weight: 700;
    padding-left: 50px;
    pointer-events: none;
}

.header-buttons {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.chat-header .header-buttons button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    padding: 5px;
    transition: opacity 0.2s, transform 0.2s;
}

.chat-header .header-buttons button:hover {
    opacity: 1;
    transform: scale(1.1);
}

#chat-maximize-btn,
#chat-minimize-btn {
    font-size: 1.1em;
    margin-right: 5px;
}

#chat-minimize-btn {
    display: none;
}

#chat-close-btn i {
    font-size: 1.5em;
}

.chat-modal-wrapper.modal-maximized {
    position: absolute;
    width: 90vw;
    height: 90vh;
    max-width: none;
    top: 5vh !important;
    left: 5vw !important;
    transform: none !important;
}

.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fcfdfe;
    display: flex;
    flex-direction: column;
    gap: 12px;

}

.chat-message {
    padding: 12px 18px;
    border-radius: 22px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-message.bot.thinking {
    background: #e0e0e0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-message.bot.thinking img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}


.chat-message.bot {
    background: #e0e0e0;
    color: #333;
    align-self: flex-start;
}

.chat-message.bot a {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 700;
}

.chat-message.user {
    background: linear-gradient(45deg, #3498db 100%);
    color: #fff;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.chat-input-area input {
    flex-grow: 1;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 18px;
    outline: none;
    font-size: 1em;
}

.chat-input-area button {
    background: linear-gradient(45deg, #3498db 100%);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    margin-left: 10px;
    color: #fff;
    cursor: pointer;
}

.chat-message.bot:not(.thinking) img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    object-fit: cover;
    flex-shrink: 0;
}


.bot-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quick-reply-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.quick-reply-btn {
    background: linear-gradient(135deg, #4ea3eA 0%, #3498db 100%);
    border: none;
    color: #fff;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.quick-reply-btn:hover {
    background: linear-gradient(135deg, #5bb0f2 0%, #3ca5e0 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.quick-reply-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    border-color: #ddd;
    cursor: default;
    transform: none;
    box-shadow: none;
}