/* TVOne Vietnam - Responsive CSS v2.2 */

/* ===== LARGE DESKTOPS ===== */
@media only screen and (max-width: 1400px) {
  .container { max-width: 1200px; }
  .menubar ul.nav > li > a { padding: 0 15px; font-size: .85rem; letter-spacing: 0.4px; }
}

@media only screen and (max-width: 1199px) {
  .hex { width: calc(33.333% - 14px); }
  .menubar ul.nav > li > a { padding: 0 10px; font-size: .82rem; }
  .slide-caption h1, .slide-caption h2 { font-size: 2.2rem; word-spacing: 3px; }
  .stat-number { font-size: 2.2rem; }
}

/* ===== TABLET LANDSCAPE / SMALL DESKTOPS ===== */
@media only screen and (max-width: 991px) {
  .header { display: none !important; }
  .header-m { display: flex !important; }
  body { padding-top: 0; }
  .breadcrumb-wrap,
  .about-hero,
  .pos-re.slide-child,
  .slideshow-wrap { margin-top: 62px !important; }
  .slide-caption h1, .slide-caption h2 { font-size: 1.9rem; }
  .slideshow-wrap img { height: 460px; }
  .about-section-3col { grid-template-columns: 1fr 1fr; gap: 25px; }
  .hex { width: calc(50% - 10px); }
  .stat-item { flex: 0 0 50% !important; }
  .section-title { font-size: 1.7rem; }
  .timeline::before { left: 20px; }
  .timeline-item,
  .timeline-item:nth-child(even) { padding-right: 0; padding-left: 56px; justify-content: flex-start; margin-bottom: 50px; }
  .timeline-dot { left: 20px; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-info-card, .contact-form-card { padding: 30px 24px; }
  .contact-item { margin-bottom: 24px; }
  .footer { padding: 50px 0 0; }
  .footer .row { row-gap: 30px; }
  .footer-section { padding: 30px 0; }
  .hiring-banner { min-height: 380px; padding: 50px 20px; }
  .hiring-banner h2 { font-size: 1.8rem; }
}

/* ===== TABLET PORTRAIT ===== */
@media only screen and (max-width: 767px) {
  body { font-size: 14px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  .section { padding: 50px 0; }
  .section-lg { padding: 70px 0; }
  .slideshow-wrap img { height: 340px !important; }
  .slide-caption h1, .slide-caption h2 { font-size: 1.6rem; }
  .slide-caption p { font-size: .9rem; }
  .section-title { font-size: 1.5rem; }
  .about-section-3col { grid-template-columns: 1fr; gap: 20px; }
  .hex { width: 100% !important; }
  .stats-bar .container { flex-wrap: wrap; }
  .stat-item { flex: 0 0 50% !important; border-right: none !important; padding: 24px 15px; }
  .contact-info-card, .contact-form-card { padding: 24px 20px; margin-bottom: 20px; }
  .contact-item { margin-bottom: 22px; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .floating-widgets { right: 12px; bottom: 20px; }
  .to-top { right: 14px; bottom: 80px; width: 40px; height: 40px; }
  .cta-banner { padding: 60px 0; }
  .cta-banner h2 { font-size: 1.7rem; }
  .map-wrap { height: 300px; }
  .ai-chat-bubble { width: calc(100vw - 36px) !important; }
  .footer-bottom .d-flex { flex-direction: column; text-align: center; gap: 8px !important; }
  .about-hero { padding: 60px 0; }
  .about-hero h1 { font-size: 2rem; }
  .timeline-content { padding: 20px 22px; }
  .hiring-banner { min-height: 340px; padding: 40px 15px; }
  .hiring-banner h2 { font-size: 1.6rem; margin-bottom: 14px; }
  .video-thumb { aspect-ratio: 16/9; }
  .news-card-img { aspect-ratio: 16/9; }
}

/* ===== MOBILE ===== */
@media only screen and (max-width: 575px) {
  h1 { font-size: 1.5rem; }
  .section { padding: 40px 0; }
  .stat-item { flex: 0 0 100% !important; padding: 20px 12px; border-right: none !important; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
  .slide-caption h1, .slide-caption h2 { font-size: 1.3rem; }
  .slide-caption .btn-wrap { flex-direction: column; align-items: flex-start; }
  .btn-primary-tv, .btn-secondary-tv, .btn-outline-tv, .btn-white-tv { padding: 11px 22px; font-size: .87rem; width: 100%; }
  .section-title { font-size: 1.35rem; }
  .about-section-3col { grid-template-columns: 1fr; }
  .news-card-img { aspect-ratio: 16/9; }
  .img-pro { aspect-ratio: 4/3; }
  .img-sub-catpro { aspect-ratio: 4/3; }
  .img-hvr { aspect-ratio: 16/9; }
  .img-catser { aspect-ratio: 16/9; }
  .img-item-proj { aspect-ratio: 16/9; }
  .contact-info-card, .contact-form-card { padding: 20px 16px; margin-bottom: 16px; }
  .contact-info-card h3 { font-size: 1.2rem; }
  .contact-item { margin-bottom: 20px; }
  .footer-cert { gap: 6px; }
  .footer-cert-badge { font-size: .72rem; padding: 4px 10px; }
  .page-name { font-size: 1.6rem; }
  .article-title { font-size: 1.6rem; }
  .timeline-item, .timeline-item:nth-child(even) { padding-left: 46px; margin-bottom: 40px; }
  .timeline-content { padding: 16px 18px; }
  .hiring-banner { min-height: 300px; padding: 30px 12px; }
  .hiring-banner h2 { font-size: 1.4rem; margin-bottom: 12px; }
  .hiring-banner p { font-size: 0.95rem; }
  .video-thumb { aspect-ratio: 16/9; }
  /* Fix: slideshow on mobile - cap height */
  .slideshow-wrap .swiper-slide img { height: 260px !important; }
}

/* ===== SMALL MOBILES ===== */
@media only screen and (max-width: 400px) {
  .section-title { font-size: 1.2rem; }
  .hex { padding: 24px 18px; }
  .floating-widgets { right: 8px; }
}

/* ===== FOOTER RESPONSIVE ===== */
@media only screen and (max-width: 1199px) {
  .footer .row { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media only screen and (max-width: 991px) {
  .footer .row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media only screen and (max-width: 767px) {
  .footer .row { grid-template-columns: 1fr; gap: 20px; }
}

/* ===== mmenu overrides ===== */
.mm-menu { background: var(--dark); color: #fff; }
.mm-navbar { background: var(--primary); }
.mm-navbar__title { color: #fff !important; font-weight: 700; }
.mm-listitem__text { color: rgba(255,255,255,.85); }
.mm-listitem--selected > .mm-listitem__text { background: rgba(255,255,255,.1); color: var(--secondary); }
.mm-listitem::after { border-color: rgba(255,255,255,.08); }
.mm-btn::before, .mm-btn::after { border-color: rgba(255,255,255,.5); }

/* ===== Bootstrap overrides ===== */
.modal-content { border-radius: 16px !important; }
.btn-close { opacity: 0.7; }
.btn-close:hover { opacity: 1; }
.badge { font-weight: 600; }

/* ===== Product filter mobile ===== */
@media only screen and (max-width: 767px) {
  .product-filter-bar { flex-wrap: wrap; gap: 8px; }
  .product-filter-bar select, .product-filter-bar input { width: 100% !important; }
  .pro-item-wrap { grid-template-columns: repeat(2, 1fr) !important; }
  .attrs .attr-item { flex-direction: column; gap: 4px; }
  .attrs .attr-name { min-width: unset !important; }
  .pro-detail-tabs .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pro-detail-tabs .nav-tabs .nav-item { flex-shrink: 0; }
}

@media only screen and (max-width: 575px) {
  .pro-item-wrap { grid-template-columns: repeat(2, 1fr) !important; }
  .tuyendung-table th:nth-child(3),
  .tuyendung-table td:nth-child(3) { display: none; }
  .news-featured-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; }
  .contact-wrap .row > div + div { margin-top: 24px; }
  .breadcrumb-title { font-size: 1.4rem; }
  .page-name { font-size: 1.4rem !important; }
}

/* ===== Fix: iOS Safari 100vh ===== */
@supports (-webkit-touch-callout: none) {
  .header-m { height: 62px; }
}

/* ===== Fix: overflow on small screens ===== */
body { overflow-x: hidden; }
.container { overflow-x: clip; }
img { max-width: 100%; height: auto; }
table.table { min-width: 0; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ===== Accessibility ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== Print ===== */
@media print {
  .header, .header-m, .footer, .floating-widgets, .to-top, .ai-chat-widget { display: none !important; }
  .slideshow-wrap { display: none !important; }
  body { color: #000; font-size: 12pt; }
  .container { max-width: 100%; }
  a { color: #000; text-decoration: underline; }
}
