/* =========================================
   Me Bim Core Styles — v2.0
   Thiết kế nhẹ, sạch, dành riêng Mẹ & Bé
   ========================================= */

/* --- Design Tokens --- */
:root {
    --mb-primary:       #e8709a;   /* hồng hoa hồng */
    --mb-primary-light: #fde8f0;   /* nền hồng nhạt */
    --mb-primary-dark:  #c9527a;   /* hồng đậm hover */
    --mb-accent:        #f4956a;   /* cam đào – điểm nhấn bé */
    --mb-accent-light:  #fff1eb;

    --mb-text:          #3c2f35;   /* nâu ấm thay đen */
    --mb-text-muted:    #9a8590;
    --mb-text-link:     #c9527a;

    --mb-bg:            #fffbfc;   /* trắng ấm */
    --mb-surface:       #fff5f8;   /* nền card nhạt */
    --mb-border:        #f0d5de;   /* viền hồng mềm */

    --mb-radius-sm:     6px;
    --mb-radius:        10px;
    --mb-radius-lg:     16px;
    --mb-shadow:        0 2px 8px rgba(200, 80, 120, 0.08);
    --mb-shadow-hover:  0 6px 20px rgba(200, 80, 120, 0.14);

    --mb-trust-bg:      #f0faf4;
    --mb-trust-border:  #b2dfcc;
    --mb-trust-text:    #2e7d52;
}

/* =========================================
   1. LAYOUT & WRAPPER
   ========================================= */

.mb-homepage-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    line-height: 1.65;
    color: var(--mb-text);
    background: var(--mb-bg);
}

/* =========================================
   2. QUICK NAV PILLS
   ========================================= */

.mb-quick-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 16px 0 12px;
    margin-bottom: 28px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mb-quick-nav::-webkit-scrollbar { display: none; }

.mb-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    background: var(--mb-surface);
    color: var(--mb-text);
    border: 1px solid var(--mb-border);
    padding: 7px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.mb-pill:hover {
    background: var(--mb-primary);
    color: #fff !important;
    border-color: var(--mb-primary);
}
.mb-pill.active {
    background: var(--mb-primary);
    color: #fff;
    border-color: var(--mb-primary);
}

/* =========================================
   3. HERO SECTION
   ========================================= */

.mb-hero-section {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    margin-bottom: 44px;
}

.mb-post-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--mb-radius);
    background: var(--mb-surface);
}
.mb-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.mb-post-thumb:hover img {
    transform: scale(1.04);
}

/* Badge */
.mb-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    z-index: 2;
    letter-spacing: 0.3px;
}
.mb-badge-new { background: var(--mb-primary); }
.mb-badge-hot { background: var(--mb-accent); }

/* Hero Main */
.mb-hero-main {
    position: relative;
    border-radius: var(--mb-radius-lg);
    overflow: hidden;
    box-shadow: var(--mb-shadow);
}
.mb-hero-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    margin: 0;
    padding: 24px 20px 20px;
    background: linear-gradient(to top, rgba(50,20,30,0.82) 0%, transparent 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

/* Hero Side */
.mb-hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mb-hero-side-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
    background: var(--mb-surface);
    border-radius: var(--mb-radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.mb-hero-side-item:hover {
    box-shadow: var(--mb-shadow);
}
.mb-hero-side-item .mb-post-thumb {
    border-radius: 0;
    height: 110px;
}
.mb-hero-side-title {
    font-size: 14px;
    margin: 0;
    padding: 8px 12px 8px 4px;
    line-height: 1.4;
}
.mb-hero-side-title a {
    color: var(--mb-text);
    text-decoration: none;
}
.mb-hero-side-title a:hover { color: var(--mb-primary); }

/* =========================================
   4. SECTION COMMON
   ========================================= */

.mb-section {
    padding: 28px 0;
}
.mb-bg-gray {
    background: var(--mb-surface);
    padding: 28px 24px;
    border-radius: var(--mb-radius-lg);
    margin-bottom: 24px;
}

/* Section Title */
.mb-cat-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid var(--mb-primary-light);
    position: relative;
}
.mb-cat-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--mb-primary);
    border-radius: 2px;
}
.mb-cat-title span {
    font-weight: 700;
    color: var(--mb-text);
}
.mb-view-all {
    font-size: 13px;
    color: var(--mb-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid var(--mb-border);
    border-radius: 50px;
    transition: all 0.2s;
}
.mb-view-all:hover {
    background: var(--mb-primary);
    color: #fff;
    border-color: var(--mb-primary);
}

/* =========================================
   5. POST LIST & ITEMS
   ========================================= */

.mb-post-list {
    display: grid;
    gap: 18px;
}
.mb-layout-grid .mb-post-list {
    grid-template-columns: repeat(4, 1fr);
}
.mb-layout-list .mb-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Post Item – Grid */
.mb-post-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--mb-radius);
    overflow: hidden;
    border: 1px solid var(--mb-border);
    transition: box-shadow 0.25s, transform 0.25s;
}
.mb-post-item:hover {
    box-shadow: var(--mb-shadow-hover);
    transform: translateY(-3px);
}

/* Post Item – List */
.mb-layout-list .mb-post-item {
    flex-direction: row;
    align-items: stretch;
    transform: none;
}
.mb-layout-list .mb-post-item:hover {
    transform: none;
    box-shadow: var(--mb-shadow);
}
.mb-layout-list .mb-post-thumb {
    width: 200px;
    flex-shrink: 0;
    border-radius: 0;
    height: auto;
}

/* Post Content */
.mb-post-content {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mb-post-title {
    font-size: 15px;
    margin: 0;
    line-height: 1.45;
    font-weight: 600;
    flex: 1;
}
.mb-post-title a {
    color: var(--mb-text);
    text-decoration: none;
}
.mb-post-title a:hover { color: var(--mb-primary); }
.mb-post-meta {
    font-size: 12px;
    color: var(--mb-text-muted);
}

/* =========================================
   6. TRUST SIGNALS (E-E-A-T)
   ========================================= */

.mb-trust-signals {
    padding: 36px 0;
    text-align: center;
}
.mb-trust-box {
    background: var(--mb-trust-bg);
    border: 1.5px solid var(--mb-trust-border);
    padding: 28px 32px;
    border-radius: var(--mb-radius-lg);
    max-width: 720px;
    margin: 0 auto;
}
.mb-trust-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}
.mb-trust-box h3 {
    margin: 0 0 8px;
    color: var(--mb-trust-text);
    font-size: 18px;
}
.mb-trust-box p {
    color: #4a6659;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* =========================================
   7. SINGLE POST UX
   ========================================= */

.single-post .entry-content {
    font-family: 'Inter', 'Roboto', -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: #3c2f35;
}
.single-post .entry-content p {
    margin-bottom: 1.4em;
}
.single-post .entry-content img {
    border-radius: var(--mb-radius);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
}

/* E-E-A-T Author Box */
.mb-eeat-box {
    display: flex;
    align-items: center;
    background: #f7f9ff;
    border: 1px solid #dce8f5;
    padding: 14px 18px;
    border-radius: var(--mb-radius);
    margin-bottom: 28px;
    gap: 14px;
}
.mb-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--mb-border);
}
.mb-author-info { font-size: 13.5px; line-height: 1.45; }
.mb-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.mb-author-role { color: #555; margin-bottom: 2px; }
.mb-author-update { color: var(--mb-text-muted); font-size: 12.5px; }

/* Reading Progress Bar */
#mb-reading-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 99999;
}
#mb-reading-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--mb-primary);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   8. AFFILIATE CTA
   ========================================= */

.mb-cta-button {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--mb-primary), var(--mb-primary-dark));
    color: #fff !important;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(200, 80, 120, 0.3);
    margin: 24px 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mb-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 80, 120, 0.4);
}

/* Quick Pick Box */
.mb-quick-pick-box {
    background: #fff8f2;
    border: 1.5px solid #ffd4b8;
    border-radius: var(--mb-radius-lg);
    padding: 20px;
    margin: 28px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(244, 149, 106, 0.1);
}
.mb-quick-pick-badge {
    position: absolute;
    top: -14px;
    left: 18px;
    background: var(--mb-accent);
    color: #fff;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.mb-quick-pick-title {
    font-size: 19px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 12px;
    color: var(--mb-accent);
}

/* =========================================
   9. GENERATEPRESS GLOBAL OVERRIDES
   ========================================= */

/* Header – nền trắng sạch, bóng mỏng */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--mb-border);
    box-shadow: 0 1px 6px rgba(200, 80, 120, 0.06);
}

/* Logo */
.site-logo img,
.custom-logo {
    max-height: 52px;
    width: auto;
}

/* Nav links */
.main-navigation .main-nav ul li a {
    color: var(--mb-text);
    font-weight: 500;
    font-size: 14.5px;
    padding: 6px 14px;
    transition: color 0.2s;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--mb-primary);
}
.main-navigation ul ul {
    border-radius: var(--mb-radius-sm);
    box-shadow: var(--mb-shadow-hover);
    border: 1px solid var(--mb-border);
}

/* Tiêu đề bài viết trong loop */
.entry-title a {
    color: var(--mb-text);
    text-decoration: none;
}
.entry-title a:hover { color: var(--mb-primary); }

/* Footer */
.site-footer {
    background: #fff5f8;
    border-top: 1px solid var(--mb-border);
    color: var(--mb-text-muted);
    font-size: 13.5px;
}
.site-footer a {
    color: var(--mb-primary);
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Sidebar widget titles */
.sidebar .widget-title,
.sidebar .widgettitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--mb-text);
    border-bottom: 2px solid var(--mb-primary-light);
    padding-bottom: 8px;
    margin-bottom: 12px;
    position: relative;
}
.sidebar .widget-title::after,
.sidebar .widgettitle::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 36px; height: 2px;
    background: var(--mb-primary);
    border-radius: 2px;
}

/* =========================================
   10. ARCHIVE & CATEGORY PAGES
   ========================================= */

/* Page header – tiêu đề danh mục */
.page-header {
    background: linear-gradient(135deg, var(--mb-primary-light) 0%, #fff0f8 100%);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius-lg);
    padding: 28px 32px;
    margin-bottom: 32px;
}
.page-header .page-title,
.page-header .archive-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--mb-primary-dark);
    margin: 0 0 8px;
}
.taxonomy-description,
.page-header .archive-description {
    color: var(--mb-text-muted);
    font-size: 14.5px;
    margin: 0;
    line-height: 1.6;
}

/* Post cards trong archive loop */
.archive .inside-article,
.blog .inside-article,
.search-results .inside-article {
    background: #fff;
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius);
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
    margin-bottom: 20px;
}
.archive .inside-article:hover,
.blog .inside-article:hover,
.search-results .inside-article:hover {
    box-shadow: var(--mb-shadow-hover);
    transform: translateY(-2px);
}

/* Featured image trong archive */
.archive .post-image,
.blog .post-image,
.search-results .post-image {
    margin: 0;
    overflow: hidden;
    border-radius: var(--mb-radius) var(--mb-radius) 0 0;
}
.archive .post-image img,
.blog .post-image img,
.search-results .post-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.archive .inside-article:hover .post-image img,
.blog .inside-article:hover .post-image img {
    transform: scale(1.04);
}

/* Entry header & title */
.archive .entry-header,
.blog .entry-header,
.search-results .entry-header {
    padding: 16px 20px 0;
}
.archive .entry-title,
.blog .entry-title,
.search-results .entry-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px;
}

/* Entry meta (ngày, tác giả) */
.archive .entry-meta,
.blog .entry-meta,
.search-results .entry-meta {
    font-size: 12.5px;
    color: var(--mb-text-muted);
    padding: 0 20px;
    margin-bottom: 8px;
}
.archive .entry-meta a,
.blog .entry-meta a {
    color: var(--mb-text-muted);
    text-decoration: none;
}
.archive .entry-meta a:hover { color: var(--mb-primary); }

/* Excerpt */
.archive .entry-summary,
.blog .entry-summary,
.search-results .entry-summary {
    font-size: 14.5px;
    color: #5a4a50;
    padding: 0 20px 18px;
    line-height: 1.6;
    margin: 0;
}
.archive .entry-summary p,
.blog .entry-summary p {
    margin: 0;
}

/* Read more link */
.archive .read-more,
.blog .read-more {
    display: inline-block;
    margin: 0 20px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mb-primary);
    text-decoration: none;
    border: 1px solid var(--mb-border);
    padding: 4px 14px;
    border-radius: 50px;
    transition: all 0.2s;
}
.archive .read-more:hover,
.blog .read-more:hover {
    background: var(--mb-primary);
    color: #fff;
    border-color: var(--mb-primary);
}

/* Pagination */
.pagination,
.paging-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 32px 0;
}
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--mb-text);
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}
.page-numbers:hover {
    background: var(--mb-primary-light);
    border-color: var(--mb-primary);
    color: var(--mb-primary-dark);
}
.page-numbers.current {
    background: var(--mb-primary);
    border-color: var(--mb-primary);
    color: #fff;
}
.page-numbers.dots {
    border: none;
    background: transparent;
}

/* =========================================
   11. SEARCH RESULTS PAGE
   ========================================= */

/* Search form – thanh tìm kiếm */
.searchform,
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}
.searchform input[type="text"],
.search-form input[type="search"],
.searchform .search-field,
.search-form .search-field {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--mb-border);
    border-radius: 50px;
    font-size: 15px;
    color: var(--mb-text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.searchform input[type="text"]:focus,
.search-form .search-field:focus {
    border-color: var(--mb-primary);
    box-shadow: 0 0 0 3px rgba(232, 112, 154, 0.12);
}
.searchform input[type="submit"],
.search-form .search-submit {
    padding: 10px 22px;
    background: var(--mb-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.searchform input[type="submit"]:hover,
.search-form .search-submit:hover {
    background: var(--mb-primary-dark);
}

/* Tiêu đề kết quả tìm kiếm */
.search-results .page-header {
    margin-bottom: 24px;
}
.search-results .page-title {
    font-size: 20px;
}
.search-results .page-title span {
    color: var(--mb-primary);
}

/* Không có kết quả */
.search-no-results .page-header {
    background: var(--mb-accent-light);
    border-color: #ffd4b8;
    text-align: center;
}
.search-no-results .page-title {
    color: var(--mb-accent);
}
.search-no-results .entry-content {
    text-align: center;
    color: var(--mb-text-muted);
    font-size: 15px;
    padding: 12px 0 28px;
}
.search-no-results .searchform,
.search-no-results .search-form {
    max-width: 500px;
    margin: 0 auto 32px;
}

/* =========================================
   12. TRANG 404
   ========================================= */

.error404 main {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.error404 .inside-article {
    text-align: center;
    padding: 60px 40px;
    max-width: 560px;
    margin: 0 auto;
}
.error404 .entry-header {
    margin-bottom: 20px;
}
.error404 .entry-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    color: var(--mb-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}
.error404 .entry-title::before {
    content: '404';
    display: block;
    font-size: clamp(72px, 12vw, 120px);
    font-weight: 900;
    color: var(--mb-primary-light);
    line-height: 1;
    margin-bottom: 8px;
}
.error404 .entry-content {
    color: var(--mb-text-muted);
    font-size: 15.5px;
    line-height: 1.65;
    margin-bottom: 28px;
}
.error404 .entry-content p { margin-bottom: 12px; }
.error404 .searchform,
.error404 .search-form {
    max-width: 420px;
    margin: 0 auto 20px;
}
/* Back home link */
.error404 .entry-content a.button,
.error404 .go-home-btn {
    display: inline-block;
    background: var(--mb-primary);
    color: #fff !important;
    padding: 11px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.error404 .entry-content a.button:hover,
.error404 .go-home-btn:hover {
    background: var(--mb-primary-dark);
    transform: translateY(-2px);
}

/* =========================================
   13. RESPONSIVE
   ========================================= */

@media (max-width: 900px) {
    .mb-layout-grid .mb-post-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-header {
        padding: 20px 20px;
    }
}

@media (max-width: 768px) {
    .mb-hero-section {
        grid-template-columns: 1fr;
    }
    .mb-hero-side-item {
        grid-template-columns: 120px 1fr;
    }
    .mb-layout-list .mb-post-item {
        flex-direction: column;
    }
    .mb-layout-list .mb-post-thumb {
        width: 100%;
        height: 200px;
    }
    .mb-hero-title {
        font-size: 18px;
        padding: 18px 16px 16px;
    }
    .mb-bg-gray {
        padding: 20px 16px;
        border-radius: var(--mb-radius);
    }
    .mb-trust-box {
        padding: 22px 18px;
    }
}

@media (max-width: 480px) {
    .mb-layout-grid .mb-post-list {
        grid-template-columns: 1fr;
    }
    .mb-hero-side-item {
        grid-template-columns: 100px 1fr;
    }
    .mb-hero-side-item .mb-post-thumb {
        height: 90px;
    }
    .mb-single-post .entry-content {
        font-size: 16px;
    }
}
