/* Cáp Điện TCT — CSS trang chủ (chỉ nạp khi is_front_page()). */

.vs-container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
/* FIX tràn ngang: item trong grid/flex mặc định có min-width:auto (không co
 * dưới kích thước nội dung tối thiểu) — text dài không có chỗ ngắt sẽ ép cả
 * track/khung rộng hơn viewport. Ép min-width:0 trên mọi item chứa văn bản dài
 * và cho phép ngắt từ khi cần, để layout luôn co đúng theo viewport thật. */
.tct-hero__text, .tct-hero__media,
.tct-about__text, .tct-about__media,
.tct-process__steps, .tct-process__form,
.tct-featured__grid > *, .tct-cats__grid > *, .tct-projects__grid > *, .tct-news__grid > * {
  min-width: 0;
}
.tct-eyebrow, .tct-hero h1, .tct-hero__desc { overflow-wrap: break-word; word-break: break-word; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
:focus-visible { outline: 3px solid var(--vs-accent); outline-offset: 2px; }

section[aria-labelledby], section[aria-label] { padding-block: 48px; }
h2 { font-size: clamp(22px, 3.2vw, 30px); color: var(--vs-primary); margin: 0 0 24px; text-wrap: balance; }
.tct-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.tct-section-head h2 { margin-bottom: 0; }
.tct-link-all { display: inline-flex; align-items: center; gap: 4px; color: var(--vs-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tct-link-all:hover { text-decoration: underline; }
.tct-link-all svg { width: 18px; height: 18px; }

/* ---------- 1. Hero ---------- */
.tct-hero { background: linear-gradient(160deg, var(--vs-primary) 0%, var(--vs-primary-dark) 100%); color: #fff; padding-block: 56px; }
.tct-hero__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.tct-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffd7ad; margin: 0 0 12px; }
.tct-hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.18; margin: 0 0 16px; color: #fff; text-wrap: balance; }
.tct-hero__desc { font-size: 16px; line-height: 1.6; color: #dbe6f0; max-width: 52ch; margin: 0 0 24px; }
.tct-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tct-hero .vs-btn--primary { background: var(--vs-accent); border-color: var(--vs-accent); }
.tct-hero .vs-btn--primary:hover { background: var(--vs-accent-hover); border-color: var(--vs-accent-hover); }
.tct-hero .vs-btn--outline { border-color: rgba(255,255,255,.55); color: #fff; }
.tct-hero .vs-btn--outline:hover { background: rgba(255,255,255,.12); }
.tct-hero__sub-cta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.tct-hero__sub-cta a { color: #fff; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; opacity: .92; }
.tct-hero__sub-cta a:hover { opacity: 1; text-decoration: underline; }
.tct-hero__sub-cta svg { width: 18px; height: 18px; }
.tct-hero__media { aspect-ratio: 4/3; border-radius: 16px; background: rgba(255,255,255,.08) center/cover no-repeat; border: 1px solid rgba(255,255,255,.18); min-height: 220px; }
@media (max-width: 860px) {
  .tct-hero__inner { grid-template-columns: 1fr; }
  .tct-hero__media { order: -1; aspect-ratio: 16/9; }
}

/* ---------- 2. Value strip ---------- */
.tct-values__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tct-values__grid li { display: flex; gap: 12px; padding: 20px; background: var(--vs-bg-light); border: 1px solid var(--vs-border); border-radius: 12px; }
.tct-values__grid svg { width: 28px; height: 28px; color: var(--vs-accent); flex: 0 0 auto; }
.tct-values__grid h3 { font-size: 15px; margin: 0 0 4px; color: var(--vs-primary); }
.tct-values__grid p { font-size: 13.5px; margin: 0; color: #566; }
@media (max-width: 900px) { .tct-values__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tct-values__grid { grid-template-columns: 1fr; } }

/* ---------- 3. Danh mục sản phẩm ---------- */
.tct-cats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tct-cat-card { display: block; border: 1px solid var(--vs-border); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .15s, transform .15s; }
.tct-cat-card:hover { box-shadow: 0 8px 24px rgba(15,53,87,.12); transform: translateY(-2px); }
.tct-cat-card__img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--vs-bg-soft); }
.tct-cat-card__body { display: block; padding: 14px 16px 18px; }
.tct-cat-card__name { display: block; font-weight: 700; color: var(--vs-primary); margin-bottom: 4px; }
.tct-cat-card__desc { display: block; font-size: 13px; color: #667; line-height: 1.45; }
@media (max-width: 900px) { .tct-cats__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tct-cats__grid { grid-template-columns: 1fr; } }

/* ---------- 4. Tìm theo nhu cầu ---------- */
.tct-usecases__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tct-usecase { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 12px; border: 1px solid var(--vs-border); border-radius: 12px; text-decoration: none; color: var(--vs-primary); font-weight: 600; font-size: 13.5px; background: #fff; min-height: 44px; justify-content: center; }
.tct-usecase svg { width: 26px; height: 26px; color: var(--vs-accent); }
.tct-usecase:hover { border-color: var(--vs-accent); }
@media (max-width: 900px) { .tct-usecases__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tct-usecases__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 5. Thương hiệu ---------- */
.tct-brands__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.tct-brand-card {
  display: block;
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  background: var(--vs-bg-light);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tct-brand-card:hover, .tct-brand-card:focus-visible {
  border-color: var(--vs-primary);
  box-shadow: 0 2px 10px rgba(15, 53, 87, .12);
}
.tct-brand-card:focus-visible { outline: 2px solid var(--vs-accent); outline-offset: 2px; }
.tct-brand-card__name { display: block; font-weight: 800; font-size: 18px; color: var(--vs-primary); letter-spacing: .02em; }
.tct-brand-card__note { display: block; font-size: 12.5px; color: #667; margin-top: 6px; }
.tct-brands__note { font-size: 12.5px; color: #889; margin: 16px 0 0; }
@media (max-width: 700px) { .tct-brands__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 6. Giới thiệu ---------- */
.tct-about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; }
.tct-about__media { aspect-ratio: 4/3; border-radius: 14px; background: var(--vs-bg-soft) center/cover no-repeat; }
.tct-about__text p { font-size: 15.5px; line-height: 1.7; color: #445; max-width: 60ch; }
@media (max-width: 800px) { .tct-about__grid { grid-template-columns: 1fr; } .tct-about__media { order: -1; } }

/* ---------- 7. Sản phẩm quan tâm ---------- */
.tct-featured__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tct-product-card { border: 1px solid var(--vs-border); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.tct-product-card__img { display: block; aspect-ratio: 4/3; background: var(--vs-bg-soft); }
.tct-product-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tct-product-card__noimg { display: block; width: 100%; height: 100%; background: var(--vs-bg-soft); }
.tct-product-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tct-product-card__cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--vs-accent); font-weight: 700; }
.tct-product-card__body h3 { font-size: 14.5px; margin: 0; line-height: 1.35; }
.tct-product-card__body h3 a { color: var(--vs-primary); text-decoration: none; }
.tct-product-card__body h3 a:hover { text-decoration: underline; }
.tct-product-card__actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
@media (max-width: 900px) { .tct-featured__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tct-featured__grid { grid-template-columns: 1fr; } }

/* ---------- 8. Quy trình + form ---------- */
.tct-process { background: var(--vs-bg-light); }
.tct-process__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.tct-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tct-steps li { display: flex; gap: 14px; }
.tct-steps__num { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--vs-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tct-steps h3 { margin: 0 0 4px; font-size: 15px; color: var(--vs-primary); }
.tct-steps p { margin: 0; font-size: 13.5px; color: #556; }
.tct-process__form { background: #fff; border: 1px solid var(--vs-border); border-radius: 14px; padding: 26px; }
.tct-form-h2 { font-size: 19px; margin: 0 0 16px; color: var(--vs-primary); }
.tct-form-fallback__cta { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tct-form-fallback__cta .vs-btn { justify-content: center; }
/* Contact Form 7 — style tối thiểu để khớp form fallback, không đè style cha. */
.tct-process__form .wpcf7-form p { margin: 0 0 14px; }
.tct-process__form .wpcf7-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--vs-primary); margin-bottom: 6px; }
.tct-process__form .wpcf7-form input[type=text], .tct-process__form .wpcf7-form input[type=tel], .tct-process__form .wpcf7-form input[type=email], .tct-process__form .wpcf7-form textarea {
  width: 100%; border: 1px solid var(--vs-border); border-radius: 8px; padding: 11px 12px; font-size: 14px; font-family: inherit; min-height: 44px;
}
.tct-process__form .wpcf7-form textarea { min-height: 90px; }
.tct-process__form .wpcf7-form input[type=submit] {
  background: var(--vs-accent); color: #fff; border: none; border-radius: 8px; padding: 12px 22px; font-weight: 700; font-size: 14.5px; cursor: pointer; min-height: 44px;
}
.tct-process__form .wpcf7-form input[type=submit]:hover { background: var(--vs-accent-hover); }
.tct-process__form .wpcf7-not-valid-tip { color: #c0261f; font-size: 12.5px; margin-top: 4px; }
.tct-process__form .wpcf7-response-output { border-radius: 8px; font-size: 13.5px; }
@media (max-width: 860px) { .tct-process__inner { grid-template-columns: 1fr; } }

/* ---------- 9. Công trình ---------- */
.tct-projects__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tct-project-card { display: block; text-decoration: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--vs-border); background: #fff; }
.tct-project-card__img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--vs-bg-soft); }
.tct-project-card__name { display: block; padding: 12px 14px; font-size: 13.5px; font-weight: 600; color: var(--vs-primary); line-height: 1.35; }
@media (max-width: 900px) { .tct-projects__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tct-projects__grid { grid-template-columns: 1fr; } }

/* ---------- 10. Catalogue ---------- */
.tct-catalogue__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tct-catalogue-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--vs-border); border-radius: 10px; text-decoration: none; color: var(--vs-primary); font-weight: 600; font-size: 14px; background: #fff; min-height: 44px; }
.tct-catalogue-card svg:first-child { color: var(--vs-accent); flex: 0 0 auto; }
.tct-catalogue-card svg:last-child { margin-left: auto; width: 18px; height: 18px; opacity: .6; }
.tct-catalogue-card:hover { border-color: var(--vs-accent); }
@media (max-width: 760px) { .tct-catalogue__grid { grid-template-columns: 1fr; } }

/* ---------- 11. Tin tức ---------- */
.tct-news__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tct-news-card { display: block; text-decoration: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--vs-border); background: #fff; }
.tct-news-card__img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.tct-news-card__title { display: block; padding: 12px 14px 16px; font-size: 13.5px; font-weight: 600; color: var(--vs-primary); line-height: 1.4; }
@media (max-width: 900px) { .tct-news__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tct-news__grid { grid-template-columns: 1fr; } }

/* ---------- 12. FAQ ---------- */
.tct-faq__list { display: grid; gap: 10px; max-width: 820px; }
.tct-faq__item { border: 1px solid var(--vs-border); border-radius: 10px; padding: 4px 18px; background: #fff; }
.tct-faq__item summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--vs-primary); display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; min-height: 44px; }
.tct-faq__item summary::-webkit-details-marker { display: none; }
.tct-faq__item summary svg { flex: 0 0 auto; transition: transform .15s; }
.tct-faq__item[open] summary svg { transform: rotate(180deg); }
.tct-faq__answer { padding: 0 0 16px; font-size: 14px; color: #556; line-height: 1.6; }

/* Mobile bottom bar (theme cha) đã cố định ở đáy — tránh nội dung cuối trang
   bị che khuất trên iPhone (safe-area do theme cha xử lý; chỉ thêm khoảng đệm). */
@media (max-width: 782px) {
  section[aria-labelledby], section[aria-label] { padding-block: 32px; }
}
