/* ==================== Reset & Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0d7377;
    --secondary-color: #14FFEC;
    --dark-color: #0a2a2d;
    --light-color: #f5f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e1e8ed;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--light-color);
}

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

/* ==================== Header ==================== */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

/* ==================== Hero Section ==================== */
.hero {
    background: linear-gradient(135deg, #0d7377 0%, #14FFEC 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary i {
    margin-right: 8px;
}

/* ==================== Features Section ==================== */
.features {
    padding: 80px 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 15px;
    background-color: var(--light-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ==================== Section Styles ==================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ==================== FAQ Section ==================== */
.faq-section {
    padding: 80px 0;
    background-color: white;
}

.faq-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn,
.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.category-btn:hover,
.filter-btn:hover,
.category-btn.active,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--light-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

.faq-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: 10px;
}

/* ==================== Cases Section ==================== */
.cases-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.cases-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.case-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.case-badge {
    padding: 5px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.case-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.case-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.case-summary {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
}

.case-key-points {
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.case-key-points strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

/* ==================== Laws Section ==================== */
.laws-section {
    padding: 80px 0;
    background-color: white;
}

.laws-list {
    max-width: 1000px;
    margin: 0 auto;
}

.law-card {
    background-color: var(--light-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s;
}

.law-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.law-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.law-name {
    font-weight: 700;
    color: var(--primary-color);
}

.law-article {
    font-weight: 600;
    color: var(--text-dark);
}

.law-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.law-content {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==================== Chatbot ==================== */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 999;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--light-color);
}

.bot-message,
.user-message {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s;
}

.user-message {
    flex-direction: row-reverse;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--text-light);
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.user-message .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.message-bubble p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.quick-btn {
    padding: 8px 15px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.quick-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chatbot-input {
    padding: 20px;
    background-color: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.chatbot-input button:hover {
    transform: scale(1.1);
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-logo i {
    color: var(--secondary-color);
}

.footer-info p {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
}

.footer-links h4,
.footer-disclaimer h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-disclaimer p {
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ==================== Scroll Animations ==================== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ==================== Loading Spinner ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
