/* IT Group Compact UI — Astra front-end only. Fonts are local, SIL OFL 1.1. */
@font-face {
  font-family: "IT Group Sans";
  src: url("fonts/noto-thai-regular.woff") format("woff");
  font-style: normal; font-weight: 400; font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: "IT Group Sans";
  src: url("fonts/noto-thai-bold.woff") format("woff");
  font-style: normal; font-weight: 600 900; font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: "IT Group Sans";
  src: url("fonts/noto-latin-regular.woff") format("woff");
  font-style: normal; font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF,U+0100-024F,U+2000-206F,U+20A0-20CF,U+2100-214F,U+2190-21FF;
}
@font-face {
  font-family: "IT Group Sans";
  src: url("fonts/noto-latin-bold.woff") format("woff");
  font-style: normal; font-weight: 600 900; font-display: swap;
  unicode-range: U+0000-00FF,U+0100-024F,U+2000-206F,U+20A0-20CF,U+2100-214F,U+2190-21FF;
}

:root {
  --itg-font: "IT Group Sans", "Noto Sans Thai", "Noto Sans", "Leelawadee UI", Tahoma, Arial, sans-serif;
  --itg-green: #236b37;
  --itg-green-ink: #165128;
  --itg-green-pale: #edf8e9;
  --itg-text: #223528;
}

/* Keep icon fonts, code and the WordPress toolbar outside broad font overrides. */
body, body .site-content, body .entry-content,
body .ast-article-post, body .ast-article-single,
body .widget, body .site-footer,
body .woocommerce, body .woocommerce-page {
  font-family: var(--itg-font) !important;
}
body { font-size: 16px; line-height: 1.65; }
body .entry-content { font-size: 17px; line-height: 1.8; overflow-wrap: break-word; }
body .entry-content p, body .entry-content li { line-height: 1.8; }
body .entry-content p { margin-bottom: 1em; }
body h1, body h2, body h3, body h4, body h5, body h6,
body .entry-title, body .site-title, body .wp-block-heading,
body .widget-title, body .woocommerce-loop-product__title {
  font-family: var(--itg-font) !important;
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: break-word;
}
body .single .entry-title, body.single .entry-title,
body .entry-content h1 { font-size: clamp(27px, 3vw, 38px); }
body .entry-content h2 { font-size: clamp(23px, 2.4vw, 30px); }
body .entry-content h3 { font-size: clamp(19px, 1.8vw, 24px); }
body .entry-content h4 { font-size: clamp(17px, 1.5vw, 21px); }
body.blog .entry-title, body.archive .entry-title { font-size: clamp(20px, 2.1vw, 27px); }
body .entry-meta, body .posted-on, body .byline { font-size: 13px; line-height: 1.55; }
body input:not([type="checkbox"]):not([type="radio"]), body select, body textarea,
body .wp-block-button__link, body .ast-button, body .woocommerce a.button,
body .woocommerce button.button, body .woocommerce input.button {
  font-family: var(--itg-font) !important;
}
body .entry-content pre, body .entry-content code, body .entry-content kbd { font-family: ui-monospace, Consolas, monospace; }
body .entry-content table { font-size: 15px; line-height: 1.65; }
body .entry-content .wp-block-table { max-width: 100%; overflow-x: auto; }
body .entry-content .wp-block-table td, body .entry-content .wp-block-table th { padding: 10px 12px; }

/* Compact, readable header. Only exact Astra front-end header elements. */
#masthead .site-branding .site-description { font-family: var(--itg-font) !important; font-size: 11px; line-height: 1.2; margin: 0; }
#masthead .main-header-menu .menu-link { font-family: var(--itg-font) !important; font-weight: 600; }
#masthead .main-header-menu .menu-link:focus-visible,
#masthead .menu-toggle:focus-visible, #masthead .ast-menu-toggle:focus-visible {
  outline: 2px solid #8bd565; outline-offset: -2px;
}
#masthead .main-header-menu .sub-menu { border-top: 2px solid var(--itg-green); }
#masthead .main-header-menu .sub-menu .menu-link {
  color: var(--itg-green-ink) !important; background: #fff;
  font-size: 13px; line-height: 1.45; padding-block: 9px;
  white-space: normal;
}
#masthead .main-header-menu .sub-menu .menu-item:hover > .menu-link,
#masthead .main-header-menu .sub-menu .menu-link:focus-visible {
  color: var(--itg-green-ink) !important; background: var(--itg-green-pale) !important;
}

@media (min-width: 922px) {
  #ast-desktop-header .ast-above-header-bar { background: var(--itg-green-pale) !important; min-height: 42px !important; }
  #ast-desktop-header .ast-primary-header-bar { background: var(--itg-green) !important; min-height: 40px !important; }
  #ast-desktop-header .ast-above-header-bar .ast-builder-grid-row,
  #ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row { min-height: 0 !important; column-gap: 5px; row-gap: 0; }
  #ast-desktop-header .ast-above-header-bar .site-header-section,
  #ast-desktop-header .ast-primary-header-bar .site-header-section { min-height: 0 !important; }
  #ast-desktop-header .site-branding { padding-block: 3px !important; margin-block: 0 !important; }
  #ast-desktop-header .site-branding .custom-logo { max-height: 32px; width: auto; object-fit: contain; }
  #ast-desktop-header .ast-builder-menu { padding-block: 0 !important; }
  #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
    font-size: clamp(12px, 1.05vw, 14px) !important;
    line-height: 38px !important; min-height: 38px;
    padding-inline: clamp(6px, .65vw, 10px) !important;
    white-space: nowrap; border-radius: 5px; transition: background-color .15s ease;
  }
  #ast-desktop-header .ast-above-header-bar .main-header-menu > .menu-item > .menu-link { color: var(--itg-green-ink) !important; }
  #ast-desktop-header .ast-primary-header-bar .main-header-menu > .menu-item > .menu-link { color: #fff !important; }
  #ast-desktop-header .ast-above-header-bar .main-header-menu > .menu-item:hover > .menu-link,
  #ast-desktop-header .ast-above-header-bar .main-header-menu > .current-menu-item > .menu-link { background: #d7efd0; }
  #ast-desktop-header .ast-primary-header-bar .main-header-menu > .menu-item:hover > .menu-link,
  #ast-desktop-header .ast-primary-header-bar .main-header-menu > .current-menu-item > .menu-link { background: #174d27; }
  #ast-desktop-header .ast-header-social-wrap { padding-block: 0; }
}

@media (max-width: 921px) {
  body .entry-content { font-size: 16px; line-height: 1.78; }
  body .entry-content p, body .entry-content li { line-height: 1.78; }
  #ast-mobile-header .ast-above-header-bar { min-height: 44px !important; background: var(--itg-green-pale) !important; }
  #ast-mobile-header .ast-primary-header-bar { min-height: 40px !important; background: var(--itg-green) !important; }
  #ast-mobile-header .ast-builder-grid-row { min-height: 0 !important; column-gap: 5px; row-gap: 0; }
  #ast-mobile-header .site-branding { padding-block: 3px !important; }
  #ast-mobile-header .site-branding .custom-logo { max-height: 31px; width: auto; object-fit: contain; }
  #ast-mobile-header .ast-builder-menu, #ast-mobile-header .ast-header-social-wrap { padding-block: 0 !important; }
  #ast-mobile-header .menu-toggle { min-width: 44px; min-height: 36px; padding: 4px 8px !important; color: #fff !important; }
  #ast-mobile-header .menu-toggle svg { fill: currentColor; }
  #ast-mobile-header .ast-mobile-header-content { background: #fff; }
  #ast-mobile-header .main-header-menu > .menu-item > .menu-link {
    color: var(--itg-green-ink) !important; background: #fff; font-size: 14px !important;
    min-height: 44px; line-height: 1.4 !important; padding-block: 9px !important;
    white-space: normal;
  }
  #ast-mobile-header .main-header-menu > .current-menu-item > .menu-link { background: var(--itg-green-pale); }
  #ast-mobile-header .main-header-menu .sub-menu .menu-link { min-height: 40px; }
  #ast-mobile-header .ast-menu-toggle { min-width: 40px; min-height: 40px; }
  body .entry-content .wp-block-table td, body .entry-content .wp-block-table th { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #masthead .main-header-menu .menu-link { transition: none; }
}
