/*
Theme Name: Minh Hung Global Styles
Description: CSS toàn trang cho website Sơn Epoxy Minh Hùng - theme Vantage/SiteOrigin.
Version: 1.0.0
*/

/* Google Font: nên tải bằng functions.php hoặc plugin tối ưu font để đạt Core Web Vitals tốt hơn. */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap");

:root {
  --mh-primary: #071d33;
  --mh-primary-2: #0c3152;
  --mh-accent: #f26522;
  --mh-accent-hover: #d94e0c;
  --mh-heading: #102a43;
  --mh-text: #34495e;
  --mh-muted: #66788a;
  --mh-light: #f4f7fa;
  --mh-white: #ffffff;
  --mh-border: #dce5ec;
  --mh-success: #16835f;
  --mh-container: 1240px;
  --mh-radius: 10px;
  --mh-shadow: 0 12px 34px rgba(7, 29, 51, 0.1);
  --mh-font: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
}

/* 1. NỀN TẢNG HIỂN THỊ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: var(--mh-font);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--mh-white);
  color: var(--mh-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  border: 0;
}

::selection {
  background: var(--mh-accent);
  color: var(--mh-white);
}

:focus-visible {
  outline: 3px solid rgba(242, 101, 34, 0.55);
  outline-offset: 3px;
}

/* 2. KHUNG TRANG VANTAGE */
.siteorigin-panels-stretch,
.panel-grid,
.panel-grid-cell,
.so-panel {
  min-width: 0;
}

.site-content,
.mh-container {
  width: min(calc(100% - 40px), var(--mh-container));
  margin-inline: auto;
}

.site-content {
  padding-top: 48px;
  padding-bottom: 64px;
}

.page-template-default .entry-content > .panel-layout,
.home .entry-content > .panel-layout {
  margin-top: -48px;
  margin-bottom: -64px;
}

.home #primary,
.page-template-default #primary {
  min-width: 0;
}

.entry-content::after,
.site-content::after {
  display: table;
  clear: both;
  content: "";
}

/* 3. HỆ THỐNG TIÊU ĐỀ VÀ NỘI DUNG */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.widget-title {
  margin: 0 0 0.65em;
  color: var(--mh-heading);
  font-family: var(--mh-font);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1,
.entry-title {
  font-size: clamp(32px, 4vw, 52px);
}

h2 {
  font-size: clamp(27px, 3vw, 40px);
}

h3 {
  font-size: clamp(22px, 2.2vw, 30px);
}

h4 {
  font-size: clamp(19px, 1.7vw, 24px);
}

h5 {
  font-size: 18px;
}

h6 {
  font-size: 16px;
}

p {
  margin: 0 0 1.35em;
}

.entry-content {
  color: var(--mh-text);
  font-size: 17px;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3 {
  scroll-margin-top: 100px;
}

.entry-content h2 {
  margin-top: 1.65em;
}

.entry-content h3 {
  margin-top: 1.35em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5em;
  padding-left: 1.35em;
}

.entry-content li {
  margin-bottom: 0.55em;
}

.entry-content li::marker {
  color: var(--mh-accent);
  font-weight: 800;
}

strong,
b {
  color: var(--mh-heading);
  font-weight: 700;
}

small {
  font-size: 0.875em;
}

/* 4. LIÊN KẾT VÀ NÚT CTA */
a {
  color: var(--mh-primary-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--mh-accent);
}

.entry-content a:not(.button):not(.mh-btn) {
  text-decoration: underline;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.btn,
.mh-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--mh-accent);
  border-radius: 6px;
  background: var(--mh-accent);
  color: var(--mh-white) !important;
  font: 700 15px/1.35 var(--mh-font);
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(242, 101, 34, 0.22);
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.btn:hover,
.mh-cta:hover {
  border-color: var(--mh-accent-hover);
  background: var(--mh-accent-hover);
  color: var(--mh-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(242, 101, 34, 0.28);
}

.mh-cta-outline {
  border-color: var(--mh-primary);
  background: transparent;
  color: var(--mh-primary) !important;
  box-shadow: none;
}

.mh-cta-outline:hover {
  background: var(--mh-primary);
  color: var(--mh-white) !important;
}

/* 5. HEADER VÀ MENU VANTAGE */
#masthead {
  position: relative;
  z-index: 1000;
  border: 0;
  background: var(--mh-white);
  box-shadow: 0 4px 22px rgba(7, 29, 51, 0.08);
}

#masthead .hgroup {
  width: min(calc(100% - 40px), var(--mh-container));
  margin-inline: auto;
  padding-top: 20px;
  padding-bottom: 20px;
}

#masthead .site-title {
  color: var(--mh-primary);
  font-size: clamp(23px, 2.4vw, 34px);
  font-weight: 800;
}

#masthead .site-description {
  color: var(--mh-muted);
  font-size: 14px;
}

.main-navigation {
  border: 0;
  background: var(--mh-primary);
}

.main-navigation > div {
  width: min(calc(100% - 40px), var(--mh-container));
  margin-inline: auto;
}

.main-navigation ul {
  margin: 0;
}

.main-navigation ul li a {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.main-navigation ul li:hover > a,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a {
  background: var(--mh-accent);
  color: var(--mh-white);
}

.main-navigation ul ul {
  min-width: 240px;
  border-top: 3px solid var(--mh-accent);
  background: var(--mh-white);
  box-shadow: var(--mh-shadow);
}

.main-navigation ul ul li a {
  min-height: 46px;
  border-bottom: 1px solid var(--mh-border);
  color: var(--mh-heading);
}

.main-navigation ul ul li:hover > a {
  background: var(--mh-light);
  color: var(--mh-accent);
}

/* 6. KHỐI NỘI DUNG, CARD VÀ DỊCH VỤ */
.mh-section {
  padding-block: clamp(56px, 7vw, 96px);
}

.mh-section-light {
  background: var(--mh-light);
}

.mh-section-dark {
  background: var(--mh-primary);
  color: rgba(255, 255, 255, 0.82);
}

.mh-section-dark h2,
.mh-section-dark h3,
.mh-section-dark strong {
  color: var(--mh-white);
}

.mh-section-heading {
  max-width: 780px;
  margin: 0 auto clamp(30px, 4vw, 52px);
  text-align: center;
}

.mh-section-heading::before {
  display: block;
  width: 54px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 99px;
  background: var(--mh-accent);
  content: "";
}

.mh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.mh-card,
.service-card,
.project-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  background: var(--mh-white);
  box-shadow: 0 8px 28px rgba(7, 29, 51, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.mh-card:hover,
.service-card:hover,
.project-card:hover {
  border-color: rgba(242, 101, 34, 0.42);
  transform: translateY(-6px);
  box-shadow: var(--mh-shadow);
}

.mh-card-body {
  padding: 26px;
}

.mh-card img,
.service-card img,
.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
}

/* 7. ẢNH, CHÚ THÍCH VÀ THƯ VIỆN */
.entry-content img,
.wp-caption,
.gallery-item img {
  border-radius: 8px;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
  padding-top: 8px;
  color: var(--mh-muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  width: auto !important;
  margin: 0 !important;
}

/* 8. BÀI VIẾT VÀ TRANG LƯU TRỮ */
.blog .post,
.archive .post,
.search .post {
  margin-bottom: 32px;
  padding: 28px;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  background: var(--mh-white);
  box-shadow: 0 7px 22px rgba(7, 29, 51, 0.06);
}

.entry-meta,
.entry-meta a,
.post-navigation,
.post-navigation a {
  color: var(--mh-muted);
  font-size: 13px;
  text-decoration: none;
}

.entry-meta a:hover,
.post-navigation a:hover {
  color: var(--mh-accent);
}

.more-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--mh-accent) !important;
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 38px;
}

.pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mh-border);
  border-radius: 5px;
  background: var(--mh-white);
  color: var(--mh-heading);
  text-decoration: none;
}

.pagination .current,
.pagination a:hover {
  border-color: var(--mh-accent);
  background: var(--mh-accent);
  color: var(--mh-white);
}

/* 9. BREADCRUMB, TRÍCH DẪN VÀ BẢNG */
.breadcrumbs,
.yoast-breadcrumb {
  margin-bottom: 24px;
  color: var(--mh-muted);
  font-size: 13px;
}

blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  border-left: 5px solid var(--mh-accent);
  border-radius: 0 8px 8px 0;
  background: var(--mh-light);
  color: var(--mh-heading);
  font-size: 1.06em;
  font-style: normal;
}

.entry-content table {
  width: 100%;
  margin: 24px 0;
  border: 1px solid var(--mh-border);
  border-collapse: collapse;
  background: var(--mh-white);
}

.entry-content th,
.entry-content td {
  padding: 13px 15px;
  border: 1px solid var(--mh-border);
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  background: var(--mh-primary);
  color: var(--mh-white);
  font-weight: 700;
}

.entry-content tr:nth-child(even) td {
  background: var(--mh-light);
}

/* 10. FORM VÀ CONTACT FORM 7 */
label {
  display: block;
  margin-bottom: 7px;
  color: var(--mh-heading);
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cdd9e2;
  border-radius: 6px;
  background: var(--mh-white);
  color: var(--mh-heading);
  font: 400 15px/1.5 var(--mh-font);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mh-accent);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.12);
}

.wpcf7-form p {
  margin-bottom: 18px;
}

.wpcf7-not-valid-tip {
  margin-top: 5px;
  color: #c62828;
  font-size: 13px;
}

.wpcf7 form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 12px 16px;
  border-width: 1px;
  border-radius: 6px;
}

/* 11. SIDEBAR */
#secondary .widget {
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  background: var(--mh-white);
}

#secondary .widget-title {
  position: relative;
  padding-bottom: 12px;
  font-size: 20px;
}

#secondary .widget-title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 42px;
  height: 3px;
  border-radius: 99px;
  background: var(--mh-accent);
  content: "";
}

#secondary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#secondary li {
  padding: 10px 0;
  border-bottom: 1px solid var(--mh-border);
}

#secondary li:last-child {
  border-bottom: 0;
}

#secondary a {
  color: var(--mh-text);
  font-size: 14px;
  text-decoration: none;
}

#secondary a:hover {
  color: var(--mh-accent);
}

/* 12. FOOTER VANTAGE */
#colophon {
  border-top: 4px solid var(--mh-accent);
  background: var(--mh-primary);
  color: rgba(255, 255, 255, 0.72);
}

#colophon .widget {
  color: rgba(255, 255, 255, 0.72);
}

#colophon h2,
#colophon h3,
#colophon h4,
#colophon .widget-title {
  color: var(--mh-white);
}

#colophon a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

#colophon a:hover {
  color: var(--mh-accent);
}

#colophon .site-info {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

/* 13. WOOCOMMERCE - NẾU CÓ */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  overflow: hidden;
  padding-bottom: 22px;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  background: var(--mh-white);
  text-align: center;
  box-shadow: 0 7px 24px rgba(7, 29, 51, 0.06);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding-inline: 16px;
  color: var(--mh-heading);
  font-weight: 700;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--mh-accent);
  font-weight: 800;
}

/* 14. RESPONSIVE TABLET */
@media (max-width: 1024px) {
  .mh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-content {
    width: min(calc(100% - 32px), var(--mh-container));
  }

  #primary,
  #secondary {
    width: 100%;
    float: none;
  }

  #secondary {
    margin-top: 42px;
  }
}

/* 15. RESPONSIVE MOBILE */
@media (max-width: 680px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  .site-content,
  .mh-container,
  #masthead .hgroup {
    width: calc(100% - 28px);
  }

  .site-content {
    padding-top: 34px;
    padding-bottom: 48px;
  }

  .page-template-default .entry-content > .panel-layout,
  .home .entry-content > .panel-layout {
    margin-top: -34px;
    margin-bottom: -48px;
  }

  .entry-content {
    font-size: 16px;
  }

  h1,
  .entry-title {
    font-size: clamp(29px, 9vw, 38px);
  }

  h2 {
    font-size: clamp(25px, 7.5vw, 32px);
  }

  h3 {
    font-size: clamp(21px, 6vw, 26px);
  }

  .mh-section {
    padding-block: 52px;
  }

  .mh-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .mh-card-body {
    padding: 21px;
  }

  .blog .post,
  .archive .post,
  .search .post,
  #secondary .widget {
    padding: 20px;
  }

  .entry-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  button,
  input[type="button"],
  input[type="reset"],
  input[type="submit"],
  .button,
  .btn,
  .mh-cta {
    min-height: 50px;
  }

  .main-navigation > div {
    width: 100%;
  }

  .main-navigation ul li a {
    min-height: 48px;
    padding-inline: 16px;
  }
}

/* 16. TRỢ NĂNG VÀ HIỆU NĂNG */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  #masthead,
  .main-navigation,
  #secondary,
  #colophon,
  .mh-cta,
  .button {
    display: none !important;
  }

  body,
  .site-content,
  #primary {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }
}