/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding-top: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 헤더 스타일 */
header {
    background-color: white;
    box-shadow: none;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 28px;
    height: 28px;
}

.logo h1 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1;
}

.logo a {
    color: #303f9f;
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: #3f51b5;
}

.logo p {
    font-size: 14px;
    color: #666;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    margin-left: 20px;
}

nav a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: #303f9f;
}

/* 메인 배너 스타일 */
.main-banner {
    background-color: #303f9f;
    color: white;
    padding: 120px 0;
    text-align: center;
    margin: 0 auto;
    margin-top: 60px;
    max-width: 1200px;
    border-radius: 0px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.main-banner .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-banner h2 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.main-banner p {
    font-size: 2.0rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 카테고리 스타일 */
.categories {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-item {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
}

.category-item:hover {
    background-color: #e8eaf6;
}

.category-item.active {
    background-color: #3f51b5;
    color: white;
}

/* 문서 카드 스타일 */
.documents {
    padding: 10px 0 60px;
}

.documents .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 0;
}

.document-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #303f9f;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #303f9f;
}

.document-card-header {
    background-color: #e8eaf6;
    padding: 15px 20px;
    font-size: 0.9rem;
    color: #303f9f;
    font-weight: 500;
}

.document-card h3 {
    font-size: 1.4rem;
    margin: 20px 20px 10px;
    color: #303f9f;
}

.document-card p {
    color: #6e7687;
    margin: 0 20px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.btn {
    display: block;
    background-color: #303f9f;
    color: white;
    padding: 12px 0;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0;
    border-radius: 0;
}

.btn:hover {
    background-color: #3f51b5;
    letter-spacing: 0.5px;
}

/* 푸터 스타일 */
footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

footer p {
    margin-bottom: 20px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #ddd;
    margin: 0 10px;
    text-decoration: none;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
}

/* 애드센스 광고 스타일 */
.ads-section {
    padding: 20px 0;
}

.desktop-ads {
    display: block;
    text-align: center;
    margin: 0 auto;
    max-width: 970px; /* 일반적인 대형 광고 크기 */
}

.mobile-ads {
    display: none;
}

/* 챗봇 스타일 */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #3f51b5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    background-color: #303f9f;
}

.chatbot-icon {
    font-size: 24px;
}

.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0;
}

.chatbot-container.active {
    transform: scale(1);
    opacity: 1;
}

.chatbot-header {
    background-color: #3f51b5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.chatbot-controls {
    display: flex;
    gap: 15px;
}

.settings-button, .close-button {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.settings-button:hover, .close-button:hover {
    opacity: 1;
}

.chatbot-settings {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0;
}

.settings-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.settings-option:hover {
    background-color: #f0f2f5;
}

.settings-option i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
    color: #3f51b5;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fb;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-break: break-word;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.bot-message a {
    color: #3f51b5;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.bot-message a:hover {
    color: #303f9f;
}

.user-message {
    background-color: #3f51b5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    background-color: white;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.chatbot-input input:focus {
    border-color: #3f51b5;
}

.chatbot-input button {
    background-color: #3f51b5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.chatbot-input button:hover {
    background-color: #303f9f;
}

/* 프롬프트 설정 패널 스타일 */
.chatbot-prompt-settings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prompt-header {
    background-color: #3f51b5;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prompt-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.close-prompt-settings {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-prompt-settings:hover {
    opacity: 1;
}

.prompt-templates, .custom-prompt {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.prompt-templates label, .custom-prompt label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.prompt-templates select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    outline: none;
}

.custom-prompt textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: none;
    font-family: 'Noto Sans KR', sans-serif;
    outline: none;
}

.custom-prompt textarea:focus {
    border-color: #3f51b5;
}

.prompt-actions {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.prompt-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#apply-prompt {
    background-color: #3f51b5;
    color: white;
}

#apply-prompt:hover {
    background-color: #303f9f;
}

#cancel-prompt {
    background-color: #f0f0f0;
    color: #333;
}

#cancel-prompt:hover {
    background-color: #e0e0e0;
}

/* 반응형 스타일 */
@media (max-width: 992px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }
    
    nav {
        margin-top: 15px;
    }
    
    nav li:first-child {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .documents {
        padding: 10px 0;
    }

    .documents-grid {
        gap: 20px;
        margin-top: 15px;
    }

    .main-banner {
        margin: 60px 20px 10px 20px;
        padding: 60px 20px;
        border-radius: 0px;
        background-color: #303f9f;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        min-height: 150px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .main-banner .container {
        padding: 0;
    }

    .main-banner h2 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .main-banner p {
        font-size: 1.4rem;
        line-height: 1.6;
        padding: 0 15px;
    }

    .desktop-ads {
        display: none;
    }
    
    .mobile-ads {
        display: block;
    }
    
    .document-card {
        max-width: 100%;
        border: 2px solid #303f9f;
    }
    
    .chatbot-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-container {
        width: 90%;
        max-width: 320px;
        right: 5%;
        bottom: 75px;
    }

    header {
        padding: 15px 0;
    }

    body {
        padding-top: 0;
    }

    .header-content {
        padding: 0 15px;
    }

    .logo-img {
        width: 25px;
        height: 25px;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    nav ul {
        margin: 0;
    }

    nav li {
        margin-left: 15px;
    }

    nav a {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-banner {
        padding: 20px 10px;
        min-height: 130px;
    }
    .main-banner h2 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    .main-banner p {
        font-size: 1.05rem;
        line-height: 1.3;
    }
    .documents-grid {
        grid-template-columns: 1fr;
    }
    .chatbot-container {
        width: 300px;
        height: 450px;
    }
}

@media (max-width: 400px) {
    .main-banner {
        padding: 20px 5px;
        min-height: 120px;
    }
    .main-banner h2 {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    .main-banner p {
        font-size: 0.95rem;
        line-height: 1.2;
    }
}

/* 챗봇 로딩 애니메이션 */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: dots 1.4s infinite ease-in-out;
    display: inline-block;
    margin: 0 2px;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dots {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* 자격증 상세 페이지 스타일 */
.certificate-detail {
    padding: 60px 0;
    background-color: #fff;
}

.certificate-detail h2 {
    color: #303f9f;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
}

.certificate-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.certificate-info h3 {
    color: #303f9f;
    font-size: 1.4rem;
    margin: 25px 0 15px;
}

.certificate-info h3:first-child {
    margin-top: 0;
}

.certificate-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.certificate-info ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.certificate-info li {
    color: #666;
    line-height: 1.8;
    margin-bottom: 8px;
}

.back-button {
    text-align: center;
    margin-top: 30px;
}

.back-button .btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    background-color: #303f9f;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.back-button .btn:hover {
    background-color: #3f51b5;
}

@media (max-width: 768px) {
    .certificate-detail {
        padding: 40px 0;
    }

    .certificate-detail h2 {
        font-size: 1.8rem;
    }

    .certificate-content {
        padding: 20px;
    }

    .certificate-info h3 {
        font-size: 1.2rem;
    }
}

@media (min-width: 769px) {
    header {
        background: white;
        box-shadow: none;
    }

    header .container {
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .main-banner {
        margin-top: 60px;
        margin-left: auto;
        margin-right: auto;
        padding: 120px 0;
        border-radius: 0;
    }
}

/* 섹션 제목 스타일 */
.section-title {
    font-size: 1.8rem;
    color: #303f9f;
    margin: 40px 0 20px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
        margin: 30px 20px 15px;
    }
} 