/* =========================================================
   IPTIME – bổ sung khi chạy trong WordPress
   (không có trong bản HTML gốc)
   ========================================================= */

/* Thanh quản trị WordPress (khi đã đăng nhập) */
.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .header { top: 46px; }
}

/* Thông báo kết quả gửi form (Contact Form 7) */
.form-msg { margin: 12px 0 0; font-size: 14px; line-height: 1.5; }
.form-msg:empty { display: none; }
.form-msg--ok { color: var(--c-green); }
.form-msg--err { color: var(--c-red); }
.btn-submit[disabled] { opacity: .6; cursor: wait; }

/* Tin tức / Dự án: nội dung thật có độ dài khác nhau -> giới hạn số dòng */
.news__title a,
.news__desc,
.project__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news__title a { -webkit-line-clamp: 2; }
.news__desc { -webkit-line-clamp: 3; }
.project__title { -webkit-line-clamp: 2; }

/* Nhãn trống (dự án chưa có danh mục/thẻ) */
.chip:empty { display: none; }

/* =========================================================
   Menu thả xuống (mục menu có trang con, không phải mega menu)
   ========================================================= */
.nav__item--drop { position: relative; display: flex; align-self: stretch; align-items: center; }
.nav-drop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 120;
  min-width: 260px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--c-white);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(35, 36, 87, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 20px; }
.nav__item--drop:hover .nav-drop,
.nav__item--drop:focus-within .nav-drop { opacity: 1; visibility: visible; transform: none; }
.nav-drop li { margin: 0; padding: 0; list-style: none; }
.nav-drop a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-text);
}
.nav-drop a:hover,
.nav-drop a.is-current { background: var(--c-bg-soft); color: var(--c-green); }

/* =========================================================
   Phân trang, tab dạng link, ghi chú trống (WordPress)
   ========================================================= */
.ipt-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.ipt-pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 14px;
  border: 1px solid var(--c-border); border-radius: var(--pill);
  font-size: 16px; font-weight: 600; color: var(--c-primary); background: var(--c-white);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ipt-pager a.page-numbers:hover { border-color: var(--c-primary); }
.ipt-pager .page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.ipt-pager .page-numbers.dots { border: 0; background: none; }
a.tab, .pill-tabs a { text-decoration: none; }
.tabs--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; justify-content: flex-start; max-width: 100%; }
.tabs--scroll .tab { flex: none; }
.ipt-empty { padding: 40px 0; text-align: center; font-size: 18px; color: var(--c-text); }
.ipt-content { font-size: 16px; line-height: 1.7; color: var(--c-text); }
.ipt-content p { margin: 0 0 1em; }
.date-filter input { cursor: pointer; }

/* Link "Bỏ qua đến nội dung" chỉ hiện khi dùng bàn phím */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; padding: 10px 16px; clip: auto; background: #fff; color: var(--c-primary); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* Chi tiết dự án: nút "Xem hồ sơ 3D" không giãn quá rộng khi thiếu mục thông tin */
@media (min-width: 1280px) {
  .pinfo .pmeta .btn-3d { flex: 0 1 345px; margin-left: auto; }
}

/* Popup Flatsome ([lightbox] / UX Block) chèn sẵn ở footer: bình thường bị CSS Flatsome ẩn (.mfp-hide).
   Trang giao diện mới không nạp CSS Flatsome -> phải tự ẩn, nếu không popup hiện lộ dưới footer. */
.mfp-hide { display: none !important; }

/* Footer: khung Facebook Page Plugin thật (thay ảnh tĩnh fb-widget.png) */
.footer__fb { width: 305px; max-width: 100%; height: 130px; border-radius: 10px; overflow: hidden; background: #fff; }
.footer__fb iframe { display: block; width: 100%; height: 130px; border: 0; }
/* Máy tính: box Facebook thành cột thứ 4, ngang hàng title Về IPTime / Dịch vụ / Liên hệ */
@media (min-width: 1280px) {
  .footer__right { display: grid; grid-template-columns: max-content minmax(180px, 1fr); column-gap: 56px; row-gap: 20px; align-content: center; }
  .footer__links { gap: 56px; grid-column: 1; grid-row: 1; }
  .footer__connect { grid-column: 1; grid-row: 2; }
  .footer__fb { grid-column: 2; grid-row: 1 / span 2; align-self: start; width: 100%; max-width: 500px; }
}

/* Khối "Nội dung giới thiệu (SEO)" cuối trang */
.seo-block { margin-top: 80px; margin-bottom: 80px; }
.seo-block__inner { position: relative; color: var(--c-sub-body); font-size: 16px; line-height: 1.7; }
.seo-block__inner.is-collapsed { max-height: 280px; overflow: hidden; }
.seo-block__inner.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(rgba(255,255,255,0), #fff); pointer-events: none; }
.seo-block__title { font-size: 28px; line-height: 1.3; font-weight: 700; color: var(--c-primary); text-transform: uppercase; margin: 0 0 20px; }
.seo-block__body h3 { font-size: 20px; font-weight: 700; color: var(--c-primary); margin: 28px 0 12px; }
.seo-block__body p { margin: 0 0 14px; }
.seo-block__body ul { list-style: disc; padding-left: 22px; margin: 0 0 14px; }
.seo-block__body li { margin-bottom: 6px; }
.seo-block__body a { color: var(--c-green); text-decoration: underline; }
.seo-block__toggle { display: block; margin: 16px auto 0; padding: 10px 28px; border: 1px solid var(--c-primary); border-radius: var(--pill); background: #fff; color: var(--c-primary); font: 600 15px/1.2 var(--font); cursor: pointer; }
.seo-block__toggle:hover { background: var(--c-primary); color: #fff; }
@media (max-width: 767px) { .seo-block { margin-top: 48px; margin-bottom: 48px; } .seo-block__title { font-size: 22px; } }

/* Mega menu: mục cấp 2 là link thật */
a.mega__cat { display: block; text-decoration: none; }
a.mega__cat:hover, a.mega__cat:focus { color: var(--c-white); text-decoration: none; }

/* Trang chủ – khối "Dịch vụ của chúng tôi": tiêu đề + từng dòng là link */
.service-card__title a, .service-card__list a { color: inherit; text-decoration: none; }
.service-card__title a:hover, .service-card__list a:hover { color: var(--c-green-2); text-decoration: underline; }

/* Lightbox ảnh dự án: canh giữa ảnh theo cả chiều dọc (ảnh ngang thấp hơn khung thiết kế 763px trước đây bị dính lên trên) */
@media (min-width: 992px) {
  .lightbox { align-items: center; padding-top: 24px; padding-bottom: 24px; }
}

/* Đội ngũ (trang Giới thiệu): ảnh nhỏ hơn bản Figma để thấy được nhiều người hơn */
.team__track { gap: 16px; }
/* Hút (scroll-snap) theo lề nội dung, không phải mép màn hình -> ảnh đầu không bị dính/cắt ở mép trái */
.team__track { scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); }
.member { width: 250px; gap: 14px; margin: 0; } /* figure mặc định của trình duyệt có lề 40px hai bên */
.member img { width: 250px; height: 275px; border-radius: 14px; }
.member b { font-size: 17px; }
.member span { font-size: 15px; }
@media (max-width: 767px) {
  .team__track { gap: 12px; }
  .member { width: 190px; gap: 12px; }
  .member img { width: 190px; height: 209px; }
  .member b { font-size: 15px; }
  .member span { font-size: 14px; }
}

/* Đội ngũ – tiêu đề "Những con người tạo nên IPTIME" nằm trên 1 dòng ở điện thoại */
@media (max-width: 767px) {
  .team .section-title { font-size: min(28px, 4.8vw); line-height: 1.4; white-space: nowrap; }
}

/* Trang Giới thiệu – mọi tiêu đề khối cùng cỡ với "Những con người tạo nên IPTIME" (nhỏ lại ở điện thoại) */
@media (max-width: 767px) {
  .page-template-templates-iptimeabout-php main .section-title,
  .page-template-templates-iptimeabout-php .vrow__text h3 { font-size: min(28px, 4.8vw); line-height: 1.4; }
  .page-template-templates-iptimeabout-php .vrow__text h3 { margin: 0; }
}
