/* Hong Sheng Metal Works – template.css
   Breakpoints: tablet <=1024px, mobile <=767px */

@font-face {
  font-family: "Questrial";
  font-display: swap;
  src: url("../fonts/questrial-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Questrial";
  font-display: swap;
  src: url("../fonts/questrial-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --red: #c22000;
  --red-2: #e41919;
  --red-dark: #7d1200;
  --ink: #151515;
  --text: #2b2b2b;
  --muted: #5f5f5f;
  --line: #e5e5e5;
  --wrap: 1170px;
  --font: "Century Gothic", "Questrial", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 15px/1.7 var(--font);
  color: var(--text);
  background: #eceef2 url("../images/bg.png") center top / 100% auto no-repeat;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover, a:focus { color: var(--red-dark); text-decoration: underline; }
:focus-visible { outline: 3px solid #1e6fd9; outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; }
.hs-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 15px; }
.hs-hidden { display: none !important; }
.hs-skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 14px; z-index: 999; }
.hs-skip:focus { left: 0; }

/* ---------- Header ---------- */
.hs-header { position: relative; z-index: 30; background: transparent; }
.hs-header__in { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 18px; padding-bottom: 14px; min-height: 100px; }
.hs-logo { display: block; flex: 0 1 332px; margin-top: 3px; }
.hs-main .hs-wrap { padding: 0 20px; }
.hs-logo img { display: block; }
.hs-header__right { display: flex; flex-direction: column; align-items: flex-end; position: relative; }

.hs-topbar ul { list-style: none; display: flex; gap: 0; margin: 2px 5px 5px 0; padding: 0; font-size: 13px; }
.hs-topbar li { display: flex; align-items: center; gap: 5px; padding-left: 25px; line-height: 23px; color: #111; }
.hs-topbar a { color: inherit; }
.hs-topbar img { width: auto; height: auto; }

/* Same construction as the original template: the 48px inner-nav.png (bar + shadow) is the
   background of the wrapper (padding 3px 5px 5px 0, anchored right/top, not stretched). */
.hs-nav { display: inline-block; padding: 3px 5px 5px 0; background: url("../images/inner-nav.png") right top no-repeat; }
.hs-nav ul { display: flex; list-style: none; margin: 0; padding: 0; font-size: 13px; font-weight: 400; text-transform: uppercase; text-align: center; line-height: 1.3; }
.hs-nav li { margin: 0; }
.hs-nav a {
  display: inline-block; box-sizing: border-box; padding: 0 20px; line-height: 40px;
  color: #fff; letter-spacing: 0; text-decoration: none; transition: all .27s cubic-bezier(0, 0, .58, 1);
}
.hs-nav a:hover, .hs-nav a:focus, .hs-nav .current > a, .hs-nav .active > a {
  background-image: url("../images/active.png"); color: #fff; text-decoration: none;
}

.hs-burger { display: none; width: 44px; height: 40px; padding: 0; border: 1px solid var(--red); background: #fff; border-radius: 3px; cursor: pointer; align-self: flex-end; }
.hs-burger span { display: block; width: 22px; height: 2px; background: var(--red); margin: 5px auto; transition: transform .2s, opacity .2s; }
.hs-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hs-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hs-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Slider ---------- */
.hs-slider { position: relative; height: 450px; overflow: hidden; background: #222; }
.hs-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s ease; }
.hs-slide.is-active { opacity: 1; z-index: 1; }
.hs-caption { position: absolute; left: 0; bottom: 70px; right: 0; }
.hs-caption h2 {
  display: inline-block; max-width: 640px; margin: 0 0 0 max(15px, calc((100% - var(--wrap)) / 2 + 15px));
  padding: 18px 24px; color: #fff; background: rgba(0, 0, 0, .55);
  font-size: 22px; text-transform: uppercase; letter-spacing: .3px; text-shadow: 0 1px 2px #000;
}
.hs-slider__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; display: flex; gap: 8px; justify-content: center; }
.hs-slider__dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid #fff; background: rgba(255, 255, 255, .35); cursor: pointer; }
.hs-slider__dots button[aria-current="true"] { background: var(--red-2); border-color: var(--red-2); }
.hs-slider__arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 42px; height: 56px; border: 0; background: rgba(0, 0, 0, .35); color: #fff; font-size: 26px; cursor: pointer; }
.hs-slider__arrow:hover { background: rgba(194, 32, 0, .85); }
.hs-slider__arrow--prev { left: 0; }
.hs-slider__arrow--next { right: 0; }

/* ---------- Home sections ---------- */
.hs-about, .hs-latest { padding: 60px 0; }
.hs-about .hs-about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hs-about .hs-about__grid img { max-width: 100%; height: auto; }
.hs-about h1, .hs-latest h1 { text-align: center; font-size: 26px; text-transform: uppercase; letter-spacing: .5px; padding-bottom: 14px; position: relative; margin-bottom: 26px; }
.hs-about h1::after, .hs-latest h1::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 46px; height: 3px; margin-left: -23px; background: var(--red); }
.hs-about em { display: block; margin-bottom: 18px; font-size: 13px; }
.hs-about ul { list-style: none; margin: 0 0 22px; padding: 0; font-size: 13px; }
.hs-about li { display: flex; gap: 8px; align-items: center; padding: 2px 0; }
.hs-about__btns { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.hs-btn, a.hs-btn {
  display: inline-block; min-width: 136px; padding: 0 18px; height: 40px; line-height: 38px; text-align: center;
  color: #fff; font-size: 13px; background: url("../images/more.png") center / 100% 100% no-repeat, var(--red);
  border: 1px solid #8f1700; text-decoration: none; cursor: pointer;
}
.hs-btn:hover, .hs-btn:focus { color: #fff; filter: brightness(1.12); text-decoration: none; }

.hs-latest { background: #2a2a2a url("../images/projects.png") center / cover no-repeat; color: #fff; text-align: center; }
.hs-latest h1 { color: #fff; }
.hs-latest__grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0 auto 40px; padding: 0 22px; max-width: 1000px; }
.hs-latest__grid img { display: block; width: 100%; border: 3px solid rgba(255, 255, 255, .45); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }

/* ---------- Inner pages ---------- */
.hs-main { padding: 6px 0 60px; outline: none; }
.hs-card { position: relative; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .25); padding: 14px 18px 30px; min-height: 380px; }
.hs-crumbs { position: absolute; right: 18px; top: 22px; font-size: 12px; z-index: 2; }
.hs-crumbs ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.hs-crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.hs-crumbs a { color: var(--ink); }
.hs-crumbs .active, .hs-crumbs li:last-child { color: var(--red); }
.hs-crumbs .mod-breadcrumbs__here { display: none; }
.hs-title { font-size: 18px; margin: 8px 0 20px; font-weight: 700; padding-right: 160px; }
.hs-content { font-size: 14px; }
.hs-content ul.services { list-style: none; margin: 0 0 20px; padding: 0; }
.hs-content ul.services li { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.hs-content .hs-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.hs-content .hs-photos a { display: block; border: 2px solid var(--red); line-height: 0; }
.hs-content .hs-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hs-content > img, .hs-content p > img { display: block; max-width: 100%; margin: 0 auto 16px; cursor: zoom-in; }

/* ---------- Gallery ---------- */
.hs-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 26px; margin: 0; padding: 0; }
.hs-grid__item { text-align: center; }
.hs-thumb { position: relative; display: block; border: 2px solid var(--red); line-height: 0; overflow: hidden; background: #ddd; }
.hs-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s; }
.hs-thumb:hover img, .hs-thumb:focus img { transform: scale(1.06); }
.hs-badge { position: absolute; right: 6px; top: 6px; min-width: 24px; height: 24px; line-height: 24px; padding: 0 6px; border-radius: 12px; background: var(--red); color: #fff; font: 12px/24px var(--font); }
.hs-grid__title { display: block; margin-top: 6px; padding-bottom: 14px; font-size: 12px; line-height: 1.4; background: url("../images/attachment-preview.png") center bottom no-repeat; }
.hs-grid__title a { color: var(--ink); }
.hs-grid__title a:hover { color: var(--red); }
.hs-pagination { margin-top: 24px; text-align: center; }
.hs-pagination ul { list-style: none; display: inline-flex; gap: 4px; padding: 0; margin: 0; }
.hs-pagination a, .hs-pagination span { display: block; padding: 4px 12px; border: 1px solid var(--line); }
.hs-pagination .active span { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Contact (com_contact) ---------- */
.com-contact h1, .com-contact h2 { font-size: 18px; }
.com-contact .contact-address, .com-contact dl { margin: 0 0 20px; }
.com-contact fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.com-contact legend { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.com-contact .control-group { margin-bottom: 14px; }
.com-contact .control-label label { display: block; font-size: 13px; margin-bottom: 4px; }
.com-contact input[type="text"], .com-contact input[type="email"], .com-contact textarea, .com-contact select {
  width: 100%; max-width: 560px; padding: 9px 12px; border: 1px solid #ccc; font: inherit; background: #fff;
}
.com-contact textarea { min-height: 150px; }
.com-contact .btn, .com-contact button[type="submit"] {
  min-width: 136px; height: 40px; padding: 0 22px; color: #fff; border: 1px solid #8f1700; cursor: pointer; font: inherit;
  background: url("../images/more.png") center / 100% 100% no-repeat, var(--red);
}
.com-contact .star { color: var(--red-2); }
joomla-alert, .alert { display: block; margin: 0 0 16px; padding: 12px 16px; border: 1px solid #c8d4e2; background: #eef3f9; }
joomla-alert[type="danger"], .alert-danger, .alert-error { background: #fdeaea; border-color: #f0b9b9; }
joomla-alert[type="success"], .alert-success { background: #eaf6ea; border-color: #b6dcb6; }

/* ---------- Footer ---------- */
.hs-footer { margin-top: 0; padding: 18px 0; background: rgba(214, 214, 214, .75); font-size: 12px; text-align: center; color: #2b2b2b; }
.hs-footer p { margin: 0; }
.hs-footer a { color: inherit; text-decoration: underline; }
.hs-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 42px; height: 42px; line-height: 42px; text-align: center; background: var(--red); color: #fff; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); text-decoration: none; }

/* GLightbox tweaks */
.glightbox-clean .gslide-description { background: #fff; }
.glightbox-clean .gdesc-inner { padding: 12px 18px; }
.glightbox-clean .gslide-title { font: 600 15px/1.4 var(--font); margin: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hs-grid { grid-template-columns: repeat(3, 1fr); }
  .hs-about, .hs-latest { padding: 60px 20px; }
  .hs-slider { height: 380px; }
  .hs-caption h2 { font-size: 19px; max-width: 520px; }
  .hs-nav a { padding: 0 14px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hs-header__in { flex-wrap: wrap; align-items: center; gap: 10px; min-height: 0; padding-top: 12px; }
  .hs-logo { flex: 0 1 220px; }
  .hs-header__right { align-items: flex-end; margin-left: auto; }
  .hs-topbar { display: none; }
  .hs-burger { display: block; }
  .hs-nav { display: none; position: absolute; right: 0; top: 48px; width: 240px; z-index: 50; padding: 0; background: none; }
  .hs-nav.is-open { display: block; }
  .hs-nav ul { flex-direction: column; background: var(--red); }
  .hs-nav a { display: block; text-align: left; height: 44px; line-height: 44px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .hs-slider { height: 260px; }
  .hs-caption { bottom: 44px; }
  .hs-caption h2 { margin-left: 15px; max-width: calc(100% - 30px); font-size: 15px; padding: 12px 14px; }
  .hs-slider__arrow { display: none; }
  .hs-about, .hs-latest { padding: 40px 20px; }
  .hs-about .hs-about__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hs-about__btns { justify-content: center; }
  .hs-latest__grid { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .hs-card { padding: 12px 14px 24px; }
  .hs-crumbs { position: static; margin: 4px 0 0; }
  .hs-title { padding-right: 0; }
  .hs-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .hs-content .hs-photos { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .hs-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact layout: details + form left, map right ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.com-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
.com-contact > * { grid-column: 1; }
.com-contact > .page-header h1 { font-size: 18px; margin: 8px 0 14px; }
.com-contact > h2 { display: none; }
.com-contact__container h2 { display: none; }
.com-contact__address, .com-contact dl { margin: 0 0 18px; }
.com-contact dl dt { display: none; }
.com-contact dl dd { margin: 0; padding: 1px 0; }
.contact-telephone::before { content: "Tel: "; }
.contact-fax::before { content: "Fax: "; }
.com-contact__form legend { font-size: 16px; }
.com-contact .form-control { max-width: 100%; }
.com-contact > .com-contact__miscinfo { grid-column: 2; grid-row: 1 / span 6; margin-top: 36px; }
.com-contact__miscinfo dl, .com-contact__miscinfo dd, .com-contact__miscinfo .contact-misc { margin: 0; display: block; }
.com-contact__miscinfo iframe { display: block; width: 100%; border: 1px solid var(--line); }

@media (max-width: 767px) {
  .com-contact { display: block; }
  .com-contact__miscinfo { margin-top: 24px; }
  .hs-about__grid, .hs-latest__grid { min-width: 0; }
  .hs-about__grid > *, .hs-latest__grid > * { min-width: 0; }
  .hs-about__grid > div:first-child img { width: 100%; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hs-slide, .hs-thumb img, .hs-burger span { transition: none; }
}
