/*
Theme Name: Astra Child
Theme URI: https://nhacaiuytin-6686.com/
Description: Custom child theme for nhacaiuytin-6686.com
Author: Minh Anh Tran
Template: astra
Version: 1.0.0
*/

/* ============================================================================
   NHACAIUYTIN-6686.COM — design v2. Same class names as before (nothing
   else needs to change), but actually designed: color system, typography,
   shadows, hover states, accordion-style FAQ, polished cards.
   Paste this entire file into: Theme File Editor -> Astra Child -> style.css
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
	--nc-blue: #0052cc;
	--nc-blue-dark: #003d99;
	--nc-gold: #f7a844;
	--nc-red: #e63946;
	--nc-green: #1a9c5c;
	--nc-ink: #1a1f2b;
	--nc-gray: #6b7280;
	--nc-bg-soft: #f6f8fc;
	--nc-border: #e5e9f0;
	--nc-shadow: 0 8px 24px rgba(15, 27, 61, 0.08);
	--nc-shadow-hover: 0 14px 32px rgba(15, 27, 61, 0.14);
	--nc-radius: 14px;
}

* { box-sizing: border-box; }

body {
	font-family: 'Be Vietnam Pro', -apple-system, sans-serif;
	color: var(--nc-ink);
	line-height: 1.75;
}

.nc-page-content h1,
.nc-page-content h2,
.nc-page-content h3 {
	font-family: 'Be Vietnam Pro', sans-serif;
	font-weight: 800;
	color: var(--nc-ink);
	line-height: 1.3;
}
.nc-page-content h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.nc-page-content h2 { font-size: clamp(22px, 3vw, 28px); margin-top: 44px; padding-top: 6px; border-top: 3px solid var(--nc-blue); }
.nc-page-content h3 { font-size: 20px; margin-top: 28px; color: var(--nc-blue-dark); }
.nc-page-content p { font-size: 16px; color: #333; }
.nc-page-content a { color: var(--nc-blue); }

/* === Top promo bar === */
.nc-top-bar { background: linear-gradient(90deg, var(--nc-blue), var(--nc-blue-dark)); color: #fff; text-align: center; padding: 10px 12px; font-size: 14px; letter-spacing: .2px; }
.nc-top-bar a { color: var(--nc-gold); font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--nc-gold); }
.nc-top-bar a:hover { color: #fff; border-color: #fff; }

/* === Header === */
.ncd-site-header { background: #fff; border-bottom: 1px solid var(--nc-border); position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.nc-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; }
.nc-logo { flex-shrink: 0; min-width: 0; }
.nc-logo img { height: 42px; width: auto; display: block; max-width: none; }
.nc-header-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.nc-header-cta { display: inline-flex !important; align-items: center; justify-content: center; white-space: nowrap; width: auto !important; flex-shrink: 0; }
.nc-mobile-toggle { display: none; flex-shrink: 0; background: var(--nc-bg-soft); border: 1px solid var(--nc-border); border-radius: 8px; width: 40px; height: 40px; font-size: 18px; line-height: 1; color: var(--nc-ink); cursor: pointer; }
.nc-nav { display: flex; align-items: center; gap: 28px; }
.nc-nav > a { text-decoration: none; color: var(--nc-ink); font-weight: 700; font-size: 15px; padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
.nc-nav > a:hover { color: var(--nc-blue); border-color: var(--nc-blue); }
.nc-dropdown { position: relative; }
.nc-dropdown-toggle { cursor: pointer; font-weight: 700; color: var(--nc-ink); font-size: 15px; display: inline-flex; align-items: center; gap: 4px; user-select: none; }
.nc-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--nc-border); border-radius: 12px; box-shadow: var(--nc-shadow-hover); min-width: 210px; padding: 10px; z-index: 1000; }
.nc-dropdown.nc-dropdown-open .nc-dropdown-menu { display: block; }
.nc-dropdown-menu a { display: block; padding: 9px 12px; text-decoration: none; color: #333; font-weight: 500; font-size: 14px; border-radius: 8px; transition: background .15s; }
.nc-dropdown-menu a:hover { background: var(--nc-bg-soft); color: var(--nc-blue); }

/* Desktop-only hover fallback — safe here since mobile never reaches this
   media query, so the tap-triggers-hover quirk on phones never applies. */
@media (min-width: 851px) {
	.nc-dropdown:hover .nc-dropdown-menu { display: block; }
}

@media (max-width: 850px) {
	.nc-header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
	.nc-header-actions { display: contents; }
	.nc-header-cta { justify-self: center; padding: 7px 14px !important; font-size: 13px !important; }
	.nc-mobile-toggle { display: block; justify-self: end; }
	.nc-nav { display: none; flex-direction: column; align-items: flex-start; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--nc-border); padding: 18px 20px; gap: 14px; box-shadow: var(--nc-shadow); max-height: 80vh; overflow-y: auto; }
	.nc-nav.nc-nav-open { display: flex; }
	.nc-nav .nc-dropdown { width: 100%; }
	.nc-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 10px; width: 100%; }
}

@media (max-width: 400px) {
	.nc-header-cta { padding: 6px 10px !important; font-size: 12px !important; }
	.nc-logo img { height: 34px; }
	.nc-header-inner { padding: 10px 12px; gap: 6px; }
}

/* === Footer === */
.ncd-site-footer { background: linear-gradient(180deg, #0f1b3d, #0a1330); color: #dfe6f5; padding: 48px 20px 0; margin-top: 50px; }
.nc-footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 32px; }
.nc-footer-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.nc-footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 16px; position: relative; padding-bottom: 10px; }
.nc-footer-col h4 a { color: #fff; text-decoration: none; }
.nc-footer-col h4 a:hover { color: var(--nc-gold); }
.nc-footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 3px; background: var(--nc-gold); border-radius: 2px; }
.nc-footer-col ul { list-style: none; margin: 0; padding: 0; }
.nc-footer-col li { margin-bottom: 9px; }
.nc-footer-col a { color: #b9c4e0; text-decoration: none; font-size: 14px; transition: color .15s; }
.nc-footer-col a:hover { color: var(--nc-gold); }
.nc-footer-bottom { text-align: center; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #7f8cad; }
@media (max-width: 850px) { .nc-footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .nc-footer-inner { grid-template-columns: 1fr; } }

/* === Content wrapper === */
.nc-page-content { max-width: 880px; margin: 0 auto; padding: 36px 20px 60px; }
.nc-page-content img { max-width: 100%; height: auto; border-radius: var(--nc-radius); box-shadow: var(--nc-shadow); display: block; }

/* === Breadcrumb === */
.nc-breadcrumb { font-size: 13px; color: var(--nc-gray); margin-bottom: 18px; }
.nc-breadcrumb a { color: var(--nc-blue); text-decoration: none; }

/* === Category hub page: related posts grid === */
.nc-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 24px 0; }
.nc-post-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--nc-border); border-radius: var(--nc-radius); overflow: hidden; background: #fff; box-shadow: var(--nc-shadow); transition: box-shadow .2s, transform .2s; }
.nc-post-card:hover { box-shadow: var(--nc-shadow-hover); transform: translateY(-3px); }
.nc-post-card-img img { width: 100%; height: 160px; object-fit: cover; display: block; border-radius: 0; box-shadow: none; }
.nc-post-card-body { padding: 16px; }
.nc-post-card-body h3 { margin: 0 0 8px; font-size: 16px; }
.nc-post-card-body p { margin: 0; font-size: 14px; color: var(--nc-gray); }
@media (max-width: 850px) { .nc-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .nc-post-grid { grid-template-columns: 1fr; } }

/* === Top 10 ranking list (in case your shortcode reuses these classes) === */
.nc-top10-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.nc-top10-item { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--nc-border); border-radius: var(--nc-radius); padding: 18px; flex-wrap: wrap; box-shadow: var(--nc-shadow); transition: box-shadow .2s, transform .2s; position: relative; }
.nc-top10-item:hover { box-shadow: var(--nc-shadow-hover); transform: translateY(-2px); }
.nc-top10-rank { font-size: 26px; font-weight: 800; color: #fff; min-width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--nc-blue), var(--nc-blue-dark)); }
.nc-top10-item:nth-child(1) .nc-top10-rank { background: linear-gradient(135deg, #ffd76a, #f7a844); }
.nc-top10-item:nth-child(2) .nc-top10-rank { background: linear-gradient(135deg, #d9d9d9, #a3a3a3); }
.nc-top10-item:nth-child(3) .nc-top10-rank { background: linear-gradient(135deg, #d99a63, #b06a35); }
.nc-top10-logo img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; box-shadow: none; }
.nc-top10-info { flex: 1; min-width: 180px; }
.nc-top10-info h3 { margin: 0 0 4px; font-size: 18px; }
.nc-top10-info p { margin: 0; color: var(--nc-gray); font-size: 14px; }
.nc-top10-actions { display: flex; gap: 8px; }
.nc-btn { padding: 10px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 14px; transition: transform .15s, box-shadow .15s; display: inline-block; }
.nc-btn-primary { background: linear-gradient(135deg, #ff7a5c, var(--nc-red)); color: #fff; box-shadow: 0 6px 16px rgba(230,57,70,.3); }
.nc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(230,57,70,.4); }
.nc-btn-outline { border: 1.5px solid var(--nc-blue); color: var(--nc-blue); }
.nc-btn-outline:hover { background: var(--nc-blue); color: #fff; }
@media (max-width: 550px) { .nc-top10-item { flex-direction: column; align-items: flex-start; } }

/* === FAQ accordion (uses <details>/<summary> — no JS needed) === */
.nc-faq-wrap { margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.nc-faq-item { border: 1px solid var(--nc-border); border-radius: 12px; padding: 4px 18px; background: #fff; box-shadow: var(--nc-shadow); }
.nc-faq-item summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.nc-faq-item summary::-webkit-details-marker { display: none; }
.nc-faq-item summary::after { content: "+"; font-size: 22px; color: var(--nc-blue); font-weight: 400; transition: transform .2s; }
.nc-faq-item[open] summary::after { transform: rotate(45deg); }
.nc-faq-answer { padding: 0 0 16px; color: #444; font-size: 15px; }

/* === Author box === */
.nc-author-box { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #eef3ff, #f6f8fc); border: 1px solid var(--nc-border); border-radius: var(--nc-radius); padding: 20px; margin: 28px 0; box-shadow: var(--nc-shadow); }
.nc-author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.12); flex-shrink: 0; }
.nc-author-bio strong { font-size: 16px; color: var(--nc-ink); }
.nc-author-bio p { margin: 6px 0; color: #333; font-size: 14px; }
.nc-author-bio a { font-weight: 600; font-size: 14px; }
@media (max-width: 550px) { .nc-author-box { flex-direction: column; text-align: center; } }

/* === Table of Contents === */
.nc-toc { background: #fff; border: 1px solid var(--nc-border); border-left: 4px solid var(--nc-blue); border-radius: 12px; padding: 20px 24px; margin: 24px 0; box-shadow: var(--nc-shadow); }
.nc-toc-title { font-weight: 800; font-size: 15px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--nc-blue-dark); }
.nc-toc ul { margin: 0; padding-left: 0; list-style: none; }
.nc-toc li { margin-bottom: 8px; }
.nc-toc li a { position: relative; padding-left: 16px; }
.nc-toc li a::before { content: "›"; position: absolute; left: 0; color: var(--nc-blue); font-weight: 700; }
.nc-toc .nc-toc-sub { margin-left: 18px; font-size: 14px; }
.nc-toc a { text-decoration: none; color: #333; }
.nc-toc a:hover { color: var(--nc-blue); }

/* === Pros / cons tables in review pages === */
table { width: 100%; border-collapse: collapse; margin: 24px 0; border-radius: 12px; overflow: hidden; box-shadow: var(--nc-shadow); }
table td, table th { border: 1px solid var(--nc-border); padding: 14px; vertical-align: top; font-size: 14.5px; }
table tr:first-child td { background: var(--nc-ink); color: #fff; font-weight: 700; }
table td:first-child:not(tr:first-child td) { background: #f0fbf4; }
table td:last-child:not(tr:first-child td) { background: #fef4f4; }
@media (max-width: 550px) {
	table, table tbody, table tr, table td { display: block; width: 100%; }
	table td { border: none; border-bottom: 1px solid #eee; }
}