/* =====================================================================
   Đồng Thành Công Pro - main.css
   Design system: Xanh lá (#1A8922), Roboto, hiện đại - tái hiện dongthanhcong.vn
   ===================================================================== */

:root {
	--dtc-primary: #1A8922;
	--dtc-secondary: #4A9553;
	--dtc-dark: #006666;
	--dtc-text: #32373c;
	--dtc-muted: #6b7280;
	--dtc-border: #e5e7eb;
	--dtc-bg-soft: #f5f7f4;
	--dtc-white: #fff;
	--dtc-radius: 8px;
	--dtc-shadow: 0 2px 12px rgba(0,0,0,.08);
	--dtc-shadow-hover: 0 8px 24px rgba(0,0,0,.14);
	--dtc-container: 1240px;
	--dtc-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* --------- Reset / base --------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
	margin: 0;
	font-family: var(--dtc-font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--dtc-text);
	background: var(--dtc-white);
	overflow-x: hidden;
}

/* ===== MEDIA AN TOÀN (không vỡ khung trên mọi thiết bị) ===== */
img, video, svg, canvas, audio, iframe, embed, object {
	max-width: 100%;
}
img, video { height: auto; display: block; }
img { object-fit: cover; }
figure { margin: 0 0 1em; max-width: 100%; }
figure img { width: 100%; height: auto; }

/* Nội dung bài viết/sản phẩm/trang: ảnh, iframe, bảng, pre không tràn */
.dtc-single-content img, .dtc-product-content img, .dtc-home-about-content img,
.dtc-single-content video, .dtc-product-content video {
	max-width: 100%; height: auto;
}
.dtc-single-content iframe, .dtc-product-content iframe, .dtc-home-about-content iframe,
.dtc-single-content embed, .dtc-product-content embed,
.dtc-single-content object, .dtc-product-content object {
	max-width: 100%;
}
.dtc-single-content table, .dtc-product-content table { display: block; width: 100%; overflow-x: auto; }
.dtc-single-content pre, .dtc-product-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; }
.dtc-single-content, .dtc-product-content, .dtc-card-excerpt, .dtc-single-title, .dtc-product-title { overflow-wrap: break-word; word-wrap: break-word; }

/* Video nhúng (YouTube...) tỉ lệ 16:9 không vỡ */
.wp-block-embed__wrapper, .dtc-video { position: relative; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper { padding-top: 56.25%; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper iframe,
.dtc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.wp-block-embed, .wp-block-embed__wrapper { max-width: 100%; }
a { color: var(--dtc-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--dtc-dark); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--dtc-text); }
ul { margin: 0; padding: 0; }

.dtc-container { max-width: var(--dtc-container); margin: 0 auto; padding: 0 16px; }
.dtc-center { text-align: center; }
.dtc-muted { color: var(--dtc-muted); }
.dtc-empty { color: var(--dtc-muted); padding: 24px 0; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 16px; z-index: 9999; }

/* --------- Buttons --------- */
.dtc-btn {
	display: inline-block;
	background: var(--dtc-primary);
	color: #fff;
	padding: 12px 28px;
	border-radius: 50px;
	font-weight: 700;
	border: 2px solid var(--dtc-primary);
	cursor: pointer;
	transition: all .25s;
}
.dtc-btn:hover { background: var(--dtc-dark); border-color: var(--dtc-dark); color: #fff; transform: translateY(-2px); }
.dtc-btn-lg { padding: 15px 40px; font-size: 18px; }
.dtc-btn-outline { background: transparent; color: var(--dtc-primary); }
.dtc-btn-outline:hover { background: var(--dtc-primary); color: #fff; }

/* --------- Top bar --------- */
.dtc-topbar { background: var(--dtc-dark); color: #fff; font-size: 13.5px; }
.dtc-topbar a { color: #fff; }
.dtc-topbar a:hover { color: #d9f5d9; }
.dtc-topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; }
.dtc-topbar-contact { display: flex; gap: 18px; align-items: center; }

/* --------- Header --------- */
.dtc-header { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.dtc-header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 16px; }
.dtc-branding { flex-shrink: 0; }
.dtc-logo-img, .dtc-branding img { max-height: 60px; width: auto; }
.dtc-header-search { flex: 1; max-width: 520px; }
.dtc-header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }

.dtc-hotline { display: flex; align-items: center; gap: 10px; color: var(--dtc-text); }
.dtc-hotline i { font-size: 28px; color: var(--dtc-primary); }
.dtc-hotline small { display: block; font-size: 12px; color: var(--dtc-muted); }
.dtc-hotline strong { display: block; font-size: 19px; color: var(--dtc-primary); }

.dtc-cart-link { position: relative; font-size: 22px; color: var(--dtc-text); }
.dtc-cart-count {
	position: absolute; top: -8px; right: -10px;
	background: var(--dtc-primary); color: #fff; font-size: 11px; font-weight: 700;
	min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
}

/* --------- Search form --------- */
.dtc-search-form { display: flex; border: 2px solid var(--dtc-primary); border-radius: 50px; overflow: hidden; background: #fff; }
.dtc-search-input { flex: 1; border: 0; padding: 10px 18px; font-size: 15px; outline: none; background: transparent; }
.dtc-search-btn { border: 0; background: var(--dtc-primary); color: #fff; padding: 0 20px; cursor: pointer; font-size: 16px; }
.dtc-search-btn:hover { background: var(--dtc-dark); }

/* --------- Navigation --------- */
.dtc-nav { background: var(--dtc-primary); }
.dtc-menu { list-style: none; display: flex; flex-wrap: wrap; }
.dtc-menu li { position: relative; }
.dtc-menu > li { display: flex; align-items: center; }
.dtc-menu > li > a { display: block; color: #fff; padding: 13px 16px; font-weight: 500; font-size: 14.5px; text-transform: uppercase; }
.dtc-menu > li > a:hover { background: rgba(0,0,0,.12); color: #fff; }

/* Nút mở submenu (mũi tên) — desktop chỉ trang trí, mobile mới bấm được */
.dtc-submenu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	background: none; border: 0; color: #fff; cursor: pointer;
	padding: 0 12px; align-self: stretch; pointer-events: none;
}
.dtc-sub-menu .dtc-submenu-toggle { color: var(--dtc-text); }
.dtc-caret { font-size: 10px; transition: transform .25s; }
.menu-item-has-children.is-expanded > .dtc-submenu-toggle .dtc-caret { transform: rotate(180deg); }

.dtc-sub-menu {
	list-style: none; position: absolute; top: 100%; left: 0; min-width: 220px;
	background: #fff; box-shadow: var(--dtc-shadow); border-top: 3px solid var(--dtc-primary);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s; z-index: 200;
}
.dtc-menu li:hover > .dtc-sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dtc-sub-menu li a { display: block; padding: 10px 18px; color: var(--dtc-text); border-bottom: 1px solid var(--dtc-border); }
.dtc-sub-menu li a:hover { background: var(--dtc-bg-soft); color: var(--dtc-primary); padding-left: 24px; }

/* sticky */
.has-sticky-header .dtc-nav { position: sticky; top: 0; z-index: 500; }

/* --------- Breadcrumb --------- */
.dtc-breadcrumb { background: var(--dtc-bg-soft); font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--dtc-border); }
.dtc-breadcrumb .sep { color: var(--dtc-muted); margin: 0 6px; }

/* --------- Sections --------- */
.dtc-section { padding: 56px 0; }
.dtc-section:nth-child(even) { background: var(--dtc-bg-soft); }
.dtc-section-title {
	text-align: center; font-size: 30px; text-transform: uppercase; margin: 0 0 36px;
	position: relative; padding-bottom: 16px;
}
.dtc-section-title::after {
	content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
	width: 70px; height: 3px; background: var(--dtc-primary); border-radius: 3px;
}

/* --------- Hero banner (ảnh thuần, giống bản gốc) --------- */
.dtc-hero-banner { width: 100%; line-height: 0; background: var(--dtc-bg-soft); }
.dtc-hero-banner .dtc-hero-img { width: 100%; height: auto; display: block; }
.dtc-hero-banner-link { display: block; }

/* --------- Hero (kiểu cũ có overlay text — giữ cho ai muốn dùng) --------- */
.dtc-hero { position: relative; background-size: cover; background-position: center; min-height: 480px; display: flex; align-items: center; }
.dtc-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,40,10,.7), rgba(0,40,10,.25)); }
.dtc-hero-inner { position: relative; max-width: 680px; color: #fff; padding: 40px 16px; }
.dtc-hero-title { color: #fff; font-size: 42px; margin: 0 0 18px; line-height: 1.2; }
.dtc-hero-sub { font-size: 19px; margin: 0 0 28px; opacity: .95; }

/* --------- Features --------- */
.dtc-features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.dtc-feature { text-align: center; background: #fff; padding: 32px 20px; border-radius: var(--dtc-radius); box-shadow: var(--dtc-shadow); transition: transform .25s; }
.dtc-feature:hover { transform: translateY(-6px); }
.dtc-feature-icon { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--dtc-bg-soft); display: flex; align-items: center; justify-content: center; }
.dtc-feature-icon i { font-size: 32px; color: var(--dtc-primary); }
.dtc-feature h3 { font-size: 18px; margin: 0 0 8px; }
.dtc-feature p { margin: 0; color: var(--dtc-muted); font-size: 14.5px; }

/* --------- Category cards --------- */
.dtc-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dtc-cat-card { display: block; background: #fff; border-radius: var(--dtc-radius); overflow: hidden; box-shadow: var(--dtc-shadow); text-align: center; transition: all .25s; }
.dtc-cat-card:hover { box-shadow: var(--dtc-shadow-hover); transform: translateY(-4px); }
.dtc-cat-img { display: block; height: 200px; background-size: cover; background-position: center; }
.dtc-cat-name { display: block; font-weight: 700; font-size: 17px; color: var(--dtc-text); padding: 14px 10px 4px; }
.dtc-cat-count { display: block; color: var(--dtc-muted); font-size: 13px; padding-bottom: 14px; }

/* --------- Card grid (post/project) --------- */
.dtc-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.dtc-card { background: #fff; border-radius: var(--dtc-radius); overflow: hidden; box-shadow: var(--dtc-shadow); display: flex; flex-direction: column; transition: all .25s; }
.dtc-card:hover { box-shadow: var(--dtc-shadow-hover); transform: translateY(-4px); }
.dtc-card-thumb { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--dtc-bg-soft); }
.dtc-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dtc-card:hover .dtc-card-thumb img { transform: scale(1.06); }
.dtc-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 40px; color: #cbd5cb; }
.dtc-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dtc-card-title { font-size: 17px; margin: 0; }
.dtc-card-title a { color: var(--dtc-text); }
.dtc-card-title a:hover { color: var(--dtc-primary); }
.dtc-card-meta { font-size: 13px; color: var(--dtc-muted); }
.dtc-card-excerpt { font-size: 14.5px; color: var(--dtc-muted); margin: 0; }
.dtc-card-more { font-weight: 600; font-size: 14px; margin-top: auto; }

/* WooCommerce products grid spacing handled by Woo, light tweak */
.woocommerce ul.products li.product .button { background: var(--dtc-primary); color: #fff; border-radius: 50px; }
.woocommerce ul.products li.product .price { color: var(--dtc-dark); font-weight: 700; }
.woocommerce a.button, .woocommerce button.button.alt, .woocommerce #respond input#submit.alt { background: var(--dtc-primary); border-radius: 50px; }
.woocommerce a.button:hover, .woocommerce button.button.alt:hover { background: var(--dtc-dark); }
.woocommerce span.onsale { background: var(--dtc-dark); }

/* --------- Section theo danh mục (trang chủ) --------- */
.dtc-cat-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; border-bottom: 2px solid var(--dtc-primary); padding-bottom: 10px; }
.dtc-cat-section-head .dtc-section-title { padding-bottom: 0; }
.dtc-cat-section-head .dtc-section-title::after { display: none; }
.dtc-cat-section-more { font-weight: 600; font-size: 14px; white-space: nowrap; }
.dtc-cat-section .dtc-product-grid { grid-template-columns: repeat(4, 1fr); }

/* --------- Đối tác --------- */
.dtc-partners-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
.dtc-partners-row img { max-height: 60px; width: auto; filter: grayscale(1); opacity: .8; transition: all .25s; }
.dtc-partners-row img:hover { filter: none; opacity: 1; }

/* --------- Giới thiệu công ty (trang chủ) --------- */
.dtc-home-about-content { max-width: 900px; margin: 0 auto; font-size: 16.5px; text-align: center; }
.dtc-home-about-content p { margin: 0 0 16px; }

/* --------- Main layout (with sidebar) --------- */
.dtc-content { min-height: 300px; }
.dtc-main-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding-top: 40px; padding-bottom: 56px; }
.dtc-main { min-width: 0; }
.dtc-page-header { margin-bottom: 28px; }
.dtc-page-title { font-size: 30px; margin: 0 0 12px; }

/* --------- Sidebar / widgets --------- */
.dtc-sidebar .widget { background: #fff; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius); padding: 20px; margin-bottom: 24px; }
.widget-title { font-size: 17px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--dtc-primary); }
.dtc-sidebar ul { list-style: none; }
.dtc-sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--dtc-border); }
.dtc-sidebar a { color: var(--dtc-text); }
.dtc-sidebar a:hover { color: var(--dtc-primary); }

/* --------- Single --------- */
.dtc-single-title { font-size: 30px; margin: 0 0 12px; }
.dtc-post-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--dtc-muted); font-size: 14px; margin-bottom: 18px; }
.dtc-single-thumb { margin: 0 0 24px; border-radius: var(--dtc-radius); overflow: hidden; }
.dtc-single-content { font-size: 16.5px; }
.dtc-single-content img { border-radius: var(--dtc-radius); margin: 16px 0; }
.dtc-single-content h2, .dtc-single-content h3 { margin: 28px 0 12px; }
.dtc-single-content p { margin: 0 0 16px; }
.dtc-single-content a { text-decoration: underline; }
.dtc-single-tags { margin-top: 24px; color: var(--dtc-muted); }
.dtc-single-tags a { display: inline-block; background: var(--dtc-bg-soft); padding: 3px 12px; border-radius: 50px; margin: 2px; font-size: 13px; }
.dtc-related { margin-top: 48px; }
.dtc-related .dtc-section-title { font-size: 24px; text-align: left; }
.dtc-related .dtc-section-title::after { left: 0; transform: none; }

/* --------- Pagination --------- */
.dtc-pagination, .navigation.pagination { margin-top: 36px; }
.dtc-pagination .nav-links, .navigation .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dtc-pagination .page-numbers, .navigation .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
	border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius); color: var(--dtc-text); padding: 0 10px;
}
.dtc-pagination .page-numbers.current, .navigation .page-numbers.current,
.dtc-pagination .page-numbers:hover, .navigation .page-numbers:hover { background: var(--dtc-primary); color: #fff; border-color: var(--dtc-primary); }

/* --------- 404 --------- */
.dtc-404 { text-align: center; padding: 80px 16px; max-width: 600px; margin: 0 auto; }
.dtc-404-code { font-size: 110px; font-weight: 900; color: var(--dtc-primary); line-height: 1; }
.dtc-404-title { font-size: 28px; margin: 8px 0 16px; }
.dtc-404 .dtc-search-form { margin: 24px auto; max-width: 420px; }

/* --------- Comments --------- */
.dtc-comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--dtc-border); }
.dtc-comments-title { font-size: 22px; margin-bottom: 20px; }
.dtc-comment-list { list-style: none; }
.dtc-comment-list .comment-body { background: var(--dtc-bg-soft); padding: 16px; border-radius: var(--dtc-radius); margin-bottom: 16px; }

/* --------- Footer --------- */
.dtc-footer { background: #1f2421; color: #c8d0c8; margin-top: 40px; font-size: 14.5px; }
.dtc-footer a { color: #c8d0c8; }
.dtc-footer a:hover { color: #fff; }
.dtc-footer-top { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr 1.2fr; gap: 36px; padding: 50px 16px; }
.dtc-footer .widget-title, .dtc-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--dtc-primary); display: inline-block; }
.dtc-footer-about img { max-height: 56px; margin-bottom: 14px; }
.dtc-footer-about p { line-height: 1.7; }
.dtc-footer-social { display: flex; gap: 10px; margin-top: 14px; }
.dtc-footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.dtc-footer-social a:hover { background: var(--dtc-primary); }
.dtc-contact-list { list-style: none; }
.dtc-contact-list li { padding: 6px 0; display: flex; gap: 8px; }
.dtc-contact-list li i { color: var(--dtc-primary); margin-top: 4px; }
.dtc-footer-menu { list-style: none; }
.dtc-footer-menu li { padding: 6px 0; }
.dtc-footer-menu i { color: var(--dtc-primary); margin-right: 6px; }
.dtc-map iframe { border-radius: var(--dtc-radius); }
.dtc-map-placeholder { font-size: 13px; color: #8a948a; }
.dtc-footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 0 16px 30px; }
.dtc-footer-bottom { background: rgba(0,0,0,.25); padding: 16px 0; text-align: center; font-size: 13.5px; }
.dtc-footer-bottom p { margin: 0; }

/* --------- Floating buttons --------- */
.dtc-floating { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; gap: 12px; }
.dtc-float-btn {
	width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
	box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .2s;
}
.dtc-float-btn:hover { transform: scale(1.1); color: #fff; }
.dtc-float-phone { background: #1A8922; animation: dtc-pulse 1.6s infinite; }
.dtc-float-zalo { background: #0068ff; font-size: 13px; font-weight: 700; }
.dtc-back-to-top { background: var(--dtc-dark); opacity: 0; visibility: hidden; }
.dtc-back-to-top.show { opacity: 1; visibility: visible; }
@keyframes dtc-pulse { 0% { box-shadow: 0 0 0 0 rgba(26,137,34,.6); } 70% { box-shadow: 0 0 0 14px rgba(26,137,34,0); } 100% { box-shadow: 0 0 0 0 rgba(26,137,34,0); } }

/* --------- Mobile menu toggle (hidden on desktop) --------- */
.dtc-menu-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.dtc-menu-toggle span { width: 26px; height: 3px; background: var(--dtc-primary); border-radius: 3px; transition: .3s; }
.dtc-menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.dtc-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.dtc-menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
