/* Custom CSS for Website Demo */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #e0f9e0 0%, #b2e5b2 100%);
    /* Xanh lá nhạt */
    color: #333;
}


/* Header hiện đại */

.main-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: linear-gradient(90deg, #b2e5b2 0%, #7be495 100%);
    box-shadow: 0 2px 8px rgba(35, 77, 32, 0.08);
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #234d20;
    margin-right: auto;
    letter-spacing: 1px;
}

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

.main-nav a {
    color: #234d20;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    font-size: 1rem;
}

.main-nav a:hover,
.main-nav a.active {
    background: #388e3c;
    color: #fff;
}


/* Mục lục nổi bật */

.toc-box {
    background: #e0f9e0;
    border: 2px solid #7be495;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(35, 77, 32, 0.08);
    padding: 1.5rem 2rem;
    margin: 2rem 0 2.5rem 0;
}

.toc-box h2 {
    color: #388e3c;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.toc-box ul {
    background: none;
    border: none;
    padding: 0 0 0 1.2rem;
    margin: 0;
}

.toc-box li {
    margin-bottom: 0.7rem;
}

.toc-box a {
    color: #234d20;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.toc-box a:hover {
    color: #388e3c;
    text-decoration: none;
}


/* Container bo góc và shadow nổi bật hơn */

.container {
    display: flex;
    flex-direction: row-reverse;
    max-width: 900px;
    margin: 2.5rem auto;
    background: #fff;
    box-shadow: 0 8px 32px rgba(35, 77, 32, 0.10);
    border-radius: 18px;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #7be495 0%, #b2e5b2 100%);
    /* Xanh lá nhạt đậm hơn */
    color: #234d20;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h3 {
    margin-top: 0;
    color: #234d20;
    border-bottom: 2px solid rgba(35, 77, 32, 0.2);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 10px 0;
}

.sidebar a {
    color: #234d20;
    text-shadow: none;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 600;
}

.sidebar a:hover {
    background: rgba(35, 77, 32, 0.08);
    color: #388e3c;
}

.content {
    flex: 1;
    padding: 40px;
    background: #f6fff6;
}

h1 {
    color: #234d20;
    border-bottom: 3px solid #7be495;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

h2 {
    color: #388e3c;
    margin-top: 35px;
    margin-bottom: 20px;
    border-left: 4px solid #7be495;
    padding-left: 15px;
}

h3 {
    color: #234d20;
    margin-top: 25px;
}

.image-desc {
    font-style: italic;
    color: #7f8c8d;
    margin-top: 10px;
    font-size: 0.9em;
}

ul {
    background: #e0f9e0;
    padding: 15px 20px;
    border-left: 4px solid #7be495;
    border-radius: 5px;
}

strong {
    color: #234d20;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

.highlight {
    background: linear-gradient(120deg, #b2e5b2 0%, #e0f9e0 100%);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}


/* ➕ Thuộc tính cho hình ảnh */

img {
    width: 800px;
    height: 450px;
    display: block;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}


/* Responsive cho header và toc-box */

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 1rem;
    }
    .main-nav {
        gap: 0.7rem;
        margin-top: 0.5rem;
    }
    .container {
        margin: 1rem;
        border-radius: 10px;
    }
    .toc-box {
        padding: 1rem 1rem;
    }
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .content {
        padding: 20px;
    }
    img {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}


/* Custom scrollbar */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.footer-center {
    text-align: center;
    width: 100%;
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #234d20;
}

.footer-links {
    text-align: center;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #388e3c;
    font-weight: 600;
    text-decoration: underline;
    margin: 0 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #234d20;
    text-decoration: none;
}