/* Custom CSS cho ThayDucTinHoc - Python Cơ Bản */

/* ===== TIÊU ĐỀ STYLING ===== */
/* Tiêu đề chính bold và căn giữa */
.md-typeset h1 {
    font-weight: 550 !important;
    text-align: center !important;
    font-size: 1.5rem !important;
    color: #3f51b5 !important;
    margin: 2rem 0 !important;
    padding: 1rem 0 !important;
    border-bottom: 3px solid #e8eaf6 !important;
    position: relative !important;
}

/* Hiệu ứng cho tiêu đề chính */
.md-typeset h1::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3f51b5, #5c6bc0);
    border-radius: 2px;
}

/* Tiêu đề phụ bold */
.md-typeset h2 {
    font-weight: 600 !important;
    color: #303f9f !important;
    border-left: 4px solid #3f51b5 !important;
    padding-left: 1rem !important;
    margin-top: 2rem !important;
}

.md-typeset h3 {
    font-weight: 600 !important;
    color: #1a237e !important;
}

.md-typeset h4, .md-typeset h5, .md-typeset h6 {
    font-weight: 600 !important;
}

/* ===== NAVIGATION STYLING ===== */
/* Tiêu đề site bold */
.md-header__title {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

/* Navigation items */
.md-nav__item .md-nav__link {
    font-weight: 500 !important;
}

.md-nav__item .md-nav__link--active {
    font-weight: 700 !important;
    color: var(--md-primary-fg-color) !important;
}

/* Section titles in navigation */
.md-nav__title {
    font-weight: 700 !important;
}

/* ===== CODE STYLING ===== */
/* Code blocks */
.md-typeset pre {
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
}

/* Inline code */
.md-typeset code {
    font-weight: 600 !important;
    background-color: #f5f5f5 !important;
    color: #1565c0 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

/* ===== DARK MODE ADJUSTMENTS ===== */
[data-md-color-scheme="slate"] .md-typeset h1 {
    color: #9fa8da !important;
    border-bottom-color: #1a237e !important;
}

[data-md-color-scheme="slate"] .md-typeset h1::after {
    background: linear-gradient(90deg, #9fa8da, #7986cb);
}

[data-md-color-scheme="slate"] .md-typeset h2 {
    color: #c5cae9 !important;
    border-left-color: #9fa8da !important;
}

[data-md-color-scheme="slate"] .md-typeset h3 {
    color: #e8eaf6 !important;
}

[data-md-color-scheme="slate"] .md-typeset code {
    background-color: #2d2d2d !important;
    color: #9fa8da !important;
}

[data-md-color-scheme="slate"] .md-typeset pre {
    border-color: #424242 !important;
}

/* ===== ADDITIONAL STYLING ===== */
/* Content container */
.md-content__inner {
    margin: 0 0.8rem !important;
}

/* Table styling */
.md-typeset table:not([class]) th {
    font-weight: 700 !important;
    background-color: #e8eaf6 !important;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
    background-color: #1a237e !important;
}

/* Button styling */
.md-typeset .md-button {
    font-weight: 600 !important;
}

/* Blockquote styling */
.md-typeset blockquote {
    border-left: 4px solid #3f51b5 !important;
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
    border-left-color: #9fa8da !important;
}

/* ===== ẢNH STYLING ===== */
/* Tự động căn giữa tất cả ảnh trong nội dung */
.md-typeset img {
    display: block !important;
    margin: 20px auto !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Dark mode cho ảnh */
[data-md-color-scheme="slate"] .md-typeset img {
    box-shadow: 0 2px 8px rgba(255,255,255,0.1) !important;
}

/* Caption ảnh (em tag sau ảnh) */
.md-typeset img + em {
    display: block !important;
    text-align: center !important;
    font-style: italic !important;
    color: #666 !important;
    font-size: 0.9em !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
}

[data-md-color-scheme="slate"] .md-typeset img + em {
    color: #aaa !important;
}

/* Đặc biệt cho ảnh trong paragraph */
.md-typeset p img {
    margin: 15px auto !important;
}

