/* Minh Long – site design layer on top of Kadence.
   Colors come from the Kadence palette (set in migrate/02-site.php):
   palette1 brand blue, palette2 dark blue, palette3 heading text, palette10 accent red. */

:root {
	--ml-radius: 10px;
	--ml-shadow: 0 1px 2px rgba(16, 42, 67, .06), 0 4px 16px rgba(16, 42, 67, .06);
	--ml-shadow-hover: 0 8px 28px rgba(11, 90, 166, .16);
	--ml-border: #e3e9f1;
	--ml-soft: #f3f7fc;
	--ml-green: #1f9d55;
}

body { -webkit-font-smoothing: antialiased; }
.ml-wrap { max-width: var(--global-content-width, 1290px); margin: 0 auto; padding: 0 var(--global-content-edge-padding, 1.5rem); }
.ml-icon { flex: none; }

/* ---------- Buttons */
.ml-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ml-btn, .ml-btn:visited { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 8px; font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; border: 2px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.ml-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ml-btn .ml-icon { width: 18px; height: 18px; }
.ml-btn--accent { background: var(--global-palette10); color: #fff; box-shadow: 0 6px 16px rgba(215, 25, 31, .25); }
.ml-btn--accent:hover { color: #fff; background: #b8141a; }
.ml-btn--primary { background: var(--global-palette1); color: #fff; }
.ml-btn--primary:hover { color: #fff; background: var(--global-palette2); }
.ml-btn--ghost { border-color: var(--global-palette1); color: var(--global-palette1); background: #fff; }
.ml-btn--ghost:hover { background: var(--global-palette1); color: #fff; }
.ml-btn--light { background: #fff; color: var(--global-palette2); }
.ml-btn--light:hover { color: var(--global-palette2); }

/* Section text margins: beat Kadence's .single-content h1/h2/p spacing */
.entry-content .ml-eyebrow { display: block; margin: 0 0 8px; }
.entry-content .ml-hero__title { margin: 0 0 16px; }
.entry-content .ml-hero__lead { margin: 0 0 28px; }
.entry-content .ml-section__title { margin: 0; }
.entry-content .ml-about .ml-section__title { margin: 0 0 16px; }
.entry-content .ml-about__text p:not(.ml-eyebrow) { margin: 0 0 20px; }
.entry-content .ml-cta-band h2 { margin: 0 0 6px; }
.entry-content .ml-cta-band p { margin: 0; }
.ml-eyebrow { line-height: 1.4; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ml-green); }

/* ---------- Header */
.site-top-header-wrap .site-header-row-container-inner { background: var(--global-palette2); }
.site-top-header-wrap, .site-top-header-wrap a { color: rgba(255, 255, 255, .88); font-size: 13.5px; text-decoration: none; }
.site-top-header-wrap a:hover { color: #fff; }
.site-top-header-wrap .site-header-row { min-height: 38px; }
.site-main-header-wrap .site-header-row-container-inner { border-bottom: 1px solid var(--ml-border); }
.main-navigation .primary-menu-container > ul > li.menu-item > a { font-weight: 600; font-size: 15.5px; color: var(--global-palette3); padding-left: 14px; padding-right: 14px; }
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a { color: var(--global-palette1); }
.header-navigation .header-menu-container ul ul.sub-menu { border-radius: 8px; box-shadow: var(--ml-shadow-hover); overflow: hidden; }
.header-navigation .header-menu-container ul ul li.menu-item > a { font-size: 14.5px; padding: .8em 1.2em; }
.header-button-wrap .header-button { background: var(--global-palette10); border-radius: 8px; font-weight: 700; padding: 11px 18px; box-shadow: 0 4px 12px rgba(215, 25, 31, .25); color: #fff; }
.header-button-wrap .header-button:hover { background: #b8141a; color: #fff; }

/* ---------- Page / post title bar */
.entry-hero .entry-hero-container-inner { background: linear-gradient(120deg, var(--global-palette2), var(--global-palette1)); }
.entry-hero .entry-header { min-height: 150px; }
.entry-hero .entry-title, .entry-hero .entry-meta, .entry-hero .entry-meta a, .entry-hero .kadence-breadcrumbs, .entry-hero .kadence-breadcrumbs a { color: #fff; }
.content-style-boxed .content-bg, .content-style-boxed.content-area .entry { border-radius: var(--ml-radius); box-shadow: var(--ml-shadow); }

/* ---------- Home */
.home .content-area { margin-top: 0; margin-bottom: 0; }
.home .entry-content-wrap { padding: 0; }
.home .entry-content > * { margin-top: 0; margin-bottom: 0; max-width: none; }
.home .entry-content > section, .home .entry-content > .ml-section { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

.ml-section { padding: 64px 0; }
.ml-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ml-section__title { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; color: var(--global-palette3); }
.ml-link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ml-link-more .ml-icon { width: 18px; height: 18px; transition: transform .15s; }
.ml-link-more:hover .ml-icon { transform: translateX(3px); }

/* Hero */
.ml-hero { background: radial-gradient(1200px 500px at 85% 20%, #dcebfb 0%, transparent 60%), linear-gradient(180deg, var(--ml-soft), #fff); padding: 56px 0 40px; overflow: hidden; }
.ml-hero__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .ml-hero__inner { grid-template-columns: 1.1fr .9fr; } .ml-hero { padding: 80px 0 64px; } }
.ml-hero__title { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.15; margin: 0 0 18px; color: var(--global-palette3); letter-spacing: -.01em; }
.ml-hero__lead { font-size: 18px; line-height: 1.65; color: var(--global-palette5); margin: 0 0 28px; max-width: 600px; }
.ml-hero__media { position: relative; display: flex; justify-content: center; }
.ml-hero__media::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(420px, 88%); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); background: #fff; border-radius: 50%; box-shadow: 0 30px 80px rgba(11, 90, 166, .18); }
.ml-hero__img { position: relative; max-height: 440px; width: auto; object-fit: contain; mix-blend-mode: multiply; }

/* Services */
.ml-services { padding-top: 0; padding-bottom: 8px; margin-top: -8px; }
.ml-services__grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ml-service, .ml-service:visited { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: #fff; border: 1px solid var(--ml-border); border-radius: var(--ml-radius); box-shadow: var(--ml-shadow); text-decoration: none; color: var(--global-palette4); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ml-service:hover { transform: translateY(-3px); box-shadow: var(--ml-shadow-hover); border-color: transparent; text-decoration: none; }
.ml-service__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--ml-soft); color: var(--global-palette1); }
.ml-service__icon .ml-icon { width: 28px; height: 28px; }
.ml-service__title { font-weight: 700; font-size: 18px; color: var(--global-palette3); }
.ml-service__desc { font-size: 15px; line-height: 1.55; color: var(--global-palette5); }

/* Product sections alternate background */
.ml-products:nth-of-type(even) { background: var(--ml-soft); }

/* About */
.ml-about { background: #fff; }
.ml-about__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .ml-about__inner { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ml-about__media img { width: 100%; height: auto; border-radius: 16px; box-shadow: var(--ml-shadow-hover); aspect-ratio: 4 / 3; object-fit: cover; }
.ml-about__text p { font-size: 17px; line-height: 1.7; color: var(--global-palette5); }
.ml-about .ml-section__title { margin-bottom: 16px; }
.ml-checklist { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.ml-checklist li { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--global-palette3); }
.ml-checklist .ml-icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #e3f5ea; color: var(--ml-green); }

/* News */
.ml-news { background: var(--ml-soft); }
.ml-news__grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ml-news-card, .ml-news-card:visited { display: flex; flex-direction: column; background: #fff; border-radius: var(--ml-radius); overflow: hidden; box-shadow: var(--ml-shadow); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.ml-news-card:hover { transform: translateY(-3px); box-shadow: var(--ml-shadow-hover); text-decoration: none; }
.ml-news-card__media { aspect-ratio: 16 / 10; background: #dfe7f1; overflow: hidden; }
.ml-news-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ml-news-card:hover .ml-news-card__media img { transform: scale(1.04); }
.ml-news-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.ml-news-card__body time { font-size: 13px; color: var(--global-palette6); }
.ml-news-card__title { font-weight: 700; font-size: 17px; line-height: 1.4; color: var(--global-palette3); }

/* CTA band */
.ml-cta-band { background: linear-gradient(120deg, var(--global-palette2), var(--global-palette1)); color: #fff; padding: 48px 0; }
.ml-cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ml-cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 28px); }
.ml-cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }

/* ---------- Product cards (refines catalog.css) */
.ml-card, .entry-content .ml-card { border-color: var(--ml-border); border-radius: var(--ml-radius); padding: 14px 14px 16px; box-shadow: var(--ml-shadow); }
.ml-card:hover { box-shadow: var(--ml-shadow-hover); transform: translateY(-3px); }
.ml-card { transition: transform .15s, box-shadow .15s; }
.ml-card__media { border-radius: 8px; }
.ml-card__title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ml-card .ml-price { font-size: 14.5px; }
.ml-card .ml-price--contact a { text-decoration: none; }

/* ---------- Catalog pages */
.ml-breadcrumbs a { text-decoration: none; }
.ml-archive__title, .ml-summary__title { color: var(--global-palette3); letter-spacing: -.01em; }
.ml-summary__price { padding: 14px 18px; background: var(--ml-soft); border-radius: 8px; display: inline-block; }
.ml-cta .button { border-radius: 8px !important; font-weight: 600; }
.ml-contact-box { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--ml-border); border-radius: var(--ml-radius); background: #fff; box-shadow: var(--ml-shadow); }
.entry-content .ml-contact-box__title, .ml-contact-box__title { margin: 0 0 10px; font-weight: 700; color: var(--global-palette3); }
.ml-contact-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ml-contact-box li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ml-contact-box .ml-icon { width: 18px; height: 18px; color: var(--global-palette1); }
.ml-contact-box a { text-decoration: none; font-weight: 600; }
.ml-gallery__main { border-radius: var(--ml-radius); box-shadow: var(--ml-shadow); border-color: var(--ml-border); }

/* ---------- Sidebar widgets as cards */
.primary-sidebar .widget { background: #fff; border: 1px solid var(--ml-border); border-radius: var(--ml-radius); padding: 20px 22px; box-shadow: var(--ml-shadow); margin-bottom: 22px; }
.primary-sidebar .widget h3 { font-size: 17px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--global-palette1); color: var(--global-palette3); }
.primary-sidebar .ml-cats a { text-decoration: none; color: var(--global-palette4); }
.primary-sidebar .ml-cats a:hover, .primary-sidebar .ml-cats li.current > a { color: var(--global-palette1); }
.primary-sidebar .ml-cats > li { border-bottom: 1px dashed var(--ml-border); padding: 7px 0; }
.primary-sidebar .ml-cats > li:last-child { border-bottom: 0; }
.primary-sidebar .ml-cats > li > a { font-weight: 600; }
.primary-sidebar .wp-block-latest-posts li { margin-bottom: 8px; }
.primary-sidebar .wp-block-latest-posts a { text-decoration: none; font-size: 15px; }
/* Sidebar "Tin tức mới": square thumbnail on the left, title + date on the right */
.primary-sidebar .ml-latest-news { padding: 0; margin: 0; }
.primary-sidebar .ml-latest-news li { position: relative; display: block; min-height: 72px; margin: 0; padding: 10px 0 10px 84px; border-bottom: 1px dashed var(--ml-border); box-sizing: content-box; }
.primary-sidebar .ml-latest-news li:first-child { padding-top: 0; }
.primary-sidebar .ml-latest-news li:last-child { border-bottom: 0; padding-bottom: 0; }
.primary-sidebar .ml-latest-news .wp-block-latest-posts__featured-image { position: absolute; left: 0; top: 10px; float: none; margin: 0; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--ml-soft); }
.primary-sidebar .ml-latest-news li:first-child .wp-block-latest-posts__featured-image { top: 0; }
.primary-sidebar .ml-latest-news .wp-block-latest-posts__featured-image img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.primary-sidebar .ml-latest-news .wp-block-latest-posts__post-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--global-palette3); }
.primary-sidebar .ml-latest-news .wp-block-latest-posts__post-title:hover { color: var(--global-palette1); }
.primary-sidebar .ml-latest-news .wp-block-latest-posts__post-date { display: block; font-size: 12.5px; color: var(--global-palette6); margin-top: 4px; }
/* Post without a featured image: no left gutter */
.primary-sidebar .ml-latest-news li:not(:has(.wp-block-latest-posts__featured-image)) { padding-left: 0; min-height: 0; }
.primary-sidebar img { border-radius: 8px; }

/* ---------- Footer */
.site-footer { font-size: 15px; }
.site-middle-footer-wrap .site-footer-row-container-inner { background: #0a2540; padding-top: 56px; padding-bottom: 32px; }
.site-bottom-footer-wrap .site-footer-row-container-inner { background: #071a2e; }
.site-footer, .site-footer p, .site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.site-footer .ml-cats li { padding: 3px 0; }
.site-bottom-footer-wrap { font-size: 13.5px; }
.site-bottom-footer-wrap .widget p { margin: 0; }

/* ---------- Mobile call bar */
.ml-callbar { display: none; }
@media (max-width: 767px) {
	.ml-callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
	.ml-callbar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px; font-weight: 700; color: #fff; text-decoration: none; }
	.ml-callbar .ml-icon { width: 20px; height: 20px; }
	.ml-callbar__call { background: var(--global-palette10); }
	.ml-callbar__contact { background: var(--global-palette1); }
	body { padding-bottom: 52px; }
	.ml-section { padding: 44px 0; }
	.ml-section__head { align-items: center; }
	.ml-hero { padding: 36px 0 28px; }
	.ml-hero__inner { gap: 24px; }
	.ml-hero__lead { font-size: 16px; margin-bottom: 22px; }
	.ml-hero__img { max-height: 210px; }
	.ml-hero__media::before { width: 230px; }
	.ml-btn { padding: 12px 18px; font-size: 15px; }
	.ml-services { margin-top: 0; }
	.ml-services__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.ml-service { padding: 16px; gap: 8px; }
	.ml-service__icon { width: 42px; height: 42px; }
	.ml-service__title { font-size: 15.5px; line-height: 1.3; }
	.ml-service__desc { display: none; }
	.ml-grid.ml-grid { gap: 12px; }
	.ml-card, .entry-content .ml-card { padding: 10px 10px 12px; }
	.ml-card__title { font-size: 14px; }
	.ml-card .ml-price { font-size: 13px; }
	.ml-card .ml-price__phone { display: none; }
}
