/* =====================================================
   blog.css — Giao diện Blog Thanh Ngọc Flower's
===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --teal-900: #0D3D39;
    --teal-800: #1A5A54;
    --teal-700: #216B63;
    --teal-600: #2A7B73;
    --teal-500: #339A90;
    --teal-400: #4DADA3;
    --teal-200: #A8D5D1;
    --teal-100: #D0ECEB;
    --teal-50:  #E5F3F1;
    --coral:    #E8856B;
    --white:    #FFFFFF;
    --gray-900: #1A1A2E;
    --gray-800: #2D374A;
    --gray-700: #3D4A5C;
    --gray-600: #5A6778;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --cream:    #F5F0EB;
    --font: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow:    0 4px 16px rgba(0,0,0,0.09);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
    --max-w: 760px;
    --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--gray-900);
    line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); }

/* ===================================================
   HEADER (reuse same as main site)
=================================================== */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 68px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 100;
    transition: box-shadow var(--transition);
}

#header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); }

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 36px; width: auto; }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--teal-600);
    white-space: nowrap;
}
.logo-sub { font-weight: 400; font-style: italic; color: var(--teal-400); }

nav { margin-left: auto; }
#nav-list { display: flex; gap: 2px; list-style: none; }

.nav-link {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--teal-600);
    background: var(--teal-50);
}

.header-phone-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: var(--teal-600);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.header-phone-btn:hover {
    background: var(--teal-800);
    box-shadow: 0 4px 14px rgba(42,123,115,0.4);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    margin-left: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--teal-600);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===================================================
   PAGE WRAPPER
=================================================== */
.page-body { padding-top: 68px; }

/* ===================================================
   BLOG LISTING PAGE
=================================================== */
.blog-hero {
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
    padding: 70px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '✿ ❀ ✾ ❁ ✿';
    position: absolute;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: rgba(255,255,255,0.08);
    letter-spacing: 40px;
    white-space: nowrap;
}

.blog-hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal-200);
    margin-bottom: 16px;
}

.blog-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: var(--white);
    font-weight: 700;
    max-width: 600px;
    margin: 0 auto 16px;
    line-height: 1.2;
}

.blog-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    max-width: 500px;
    margin: 0 auto;
}

/* Blog grid */
.blog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--teal-50);
    position: relative;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img { transform: scale(1.06); }

.blog-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--teal-200);
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.blog-card-tag {
    background: var(--teal-50);
    color: var(--teal-600);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.blog-card h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 10px;
    transition: color var(--transition);
}

.blog-card:hover h2 { color: var(--teal-600); }

.blog-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.blog-card-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--teal-600);
    transition: gap var(--transition);
}

.blog-card:hover .blog-card-read { gap: 10px; }

/* ===================================================
   ARTICLE PAGE
=================================================== */
/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 68px; left: 0;
    height: 3px;
    background: var(--teal-500);
    width: 0%;
    z-index: 99;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-400);
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--teal-600); transition: opacity var(--transition); }
.breadcrumb a:hover { opacity: 0.75; }
.breadcrumb span { color: var(--gray-300); }

/* Article layout */
.article-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* Article hero */
.article-header { margin: 32px 0 0; }

.article-tag {
    display: inline-block;
    background: var(--teal-50);
    color: var(--teal-600);
    border: 1px solid var(--teal-200);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.25;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--gray-500);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article cover image */
.article-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 36px;
    background: var(--teal-50);
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--teal-200);
    background: linear-gradient(135deg, var(--teal-50), #EBF7F5);
}

/* Article body typography */
.article-body {
    font-size: 1.0625rem;
    color: var(--gray-800);
    line-height: 1.85;
}

.article-body p { margin-bottom: 1.5em; }

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 2.5em 0 0.8em;
    padding-left: 16px;
    border-left: 3px solid var(--teal-400);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--teal-700);
    margin: 1.8em 0 0.6em;
}

.article-body strong { color: var(--gray-900); font-weight: 700; }

.article-body ul, .article-body ol {
    margin: 1em 0 1.5em 1.5em;
}

.article-body li { margin-bottom: 0.5em; }

.article-body blockquote {
    background: linear-gradient(135deg, var(--teal-50), #EBF7F5);
    border-left: 4px solid var(--teal-400);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px 24px;
    margin: 2em 0;
    font-style: italic;
    color: var(--teal-800);
    font-size: 1.05rem;
}

/* Tip box */
.tip-box {
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 2em 0;
}

.tip-box-title {
    font-weight: 700;
    color: var(--teal-700);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.tip-box p { margin-bottom: 0; font-size: 0.9rem; color: var(--teal-900); }

/* In-article CTA */
.article-cta {
    background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    margin: 3em 0;
    color: var(--white);
}

.article-cta p { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 16px; }
.article-cta h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.btn-cta-zalo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--teal-500);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all var(--transition);
}

.btn-cta-zalo:hover {
    background: var(--teal-600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42,123,115,0.4);
}

.btn-cta-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
}

.btn-cta-call:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* ===================================================
   SIDEBAR
=================================================== */
.article-sidebar { position: sticky; top: 88px; }

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* Related articles in sidebar */
.related-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition);
}

.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:hover { opacity: 0.75; }

.related-item-img {
    width: 60px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--teal-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
}

.related-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-item-info { flex: 1; }

.related-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.related-item-date { font-size: 0.72rem; color: var(--gray-400); }

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    color: var(--white);
}

.sidebar-cta .flower-icon { font-size: 2rem; margin-bottom: 12px; }
.sidebar-cta h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--white);
}
.sidebar-cta p { font-size: 0.8rem; color: rgba(255,255,255,0.75); margin-bottom: 16px; }

.sidebar-cta .btn-cta-zalo { width: 100%; justify-content: center; margin-bottom: 8px; }
.sidebar-cta .btn-cta-call { width: 100%; justify-content: center; font-size: 0.82rem; }

/* ===================================================
   RELATED ARTICLES (bottom)
=================================================== */
.related-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.related-section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===================================================
   FOOTER
=================================================== */
.blog-footer {
    background: var(--teal-900);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 28px 24px;
    font-size: 0.85rem;
}

.blog-footer a { color: var(--teal-200); }
.blog-footer a:hover { color: var(--white); }

/* ===================================================
   TOAST
=================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--teal-800);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================
   MOBILE NAV
=================================================== */
@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; margin-top: 40px; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    #nav-list { display: none; }
    .menu-toggle { display: flex; }
    nav.mobile-open #nav-list {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 68px 0 0 0;
        background: var(--white);
        padding: 24px;
        gap: 8px;
        z-index: 90;
    }
    nav.mobile-open .nav-link { font-size: 1.1rem; padding: 14px 20px; }
    .header-phone-text { display: none; }
    .header-phone-btn { padding: 9px 12px; }
    .related-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .article-layout { padding: 0 16px 60px; }
    .breadcrumb { padding: 16px 16px 0; }
}
