/* Global typography */
body {
  font-family: "Be Vietnam Pro", "Inter", Arial, sans-serif;
}
h1, h2, h3, .project-title, .cat-title {
  font-family: "Quicksand", "Be Vietnam Pro", Arial, sans-serif;
}
.btn, .ha-navbar .nav-link, .dropdown-item {
  font-family: "Be Vietnam Pro", Arial, sans-serif;
}
/* Intro text block under hero for better readability */
.intro-text {
  font-family: "Quicksand", "Be Vietnam Pro", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 500;
  margin: 0 0 16px 0;
  text-align: left;
  text-indent: 0;
}
/* Logo */
.center-img {
  display: block;
  margin: 0 auto 20px;
  max-width: 800px;
  width: 100%;
  height: auto;
}

/* Banner */
.banner {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;
  margin-bottom: 30px;
  background-color: transparent; /* no letterbox background */
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s;
}
.banner img.active {
  opacity: 1;
  z-index: 1;
}
/* Responsive banner heights to keep images fitting nicely */
@media (max-width: 575.98px) {
  .banner {
    height: 220px;
  }
  /* Preserve full image content on extra-small screens */
  .banner img,
  .hero-slider .slide {
    object-fit: contain !important;
    background-color: transparent;
  }
  /* Avoid cropping in small cards/galleries */
  .project img,
  .product-card img {
    object-fit: contain;
    background-color: #fff;
  }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .banner {
    height: 280px;
  }
  /* Prefer containing images on small screens to avoid cropping */
  .banner img,
  .hero-slider .slide {
    object-fit: contain !important;
    background-color: transparent;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .banner {
    height: 380px;
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .banner {
    height: 460px;
  }
}
@media (min-width: 1200px) {
  .banner {
    height: 560px;
  }
}
.dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.3s;
}
.dot.active {
  background: #fff;
}

/* New hero slider controls */
.hero-slider {
  width: auto;
  overflow: hidden;
}
@media (min-width: 992px) {
  .hero-slider {
    margin-left: 200px;
    margin-right: 200px;
  }
}
.hero-slider .slides {
  height: 100%;
}
.hero-slider .slide {
  opacity: 0;
  transition: opacity 0.8s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}
.hero-slider .slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-slider .slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.hero-slider .slider-prev {
  left: 12px;
}
.hero-slider .slider-next {
  right: 12px;
}
.hero-slider .slider-btn:hover {
  background: rgba(0, 0, 0, 0.55);
}
.hero-slider .slider-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-slider .slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 0;
  cursor: pointer;
}
.hero-slider .slider-dots .dot.is-active {
  background: #fff;
}

/* Center the banner and constrain width */
.hero-slider {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
@media (min-width: 1400px) {
  .hero-slider {
    max-width: 1320px;
  }
}

/* Bottom banner below slider */
.hero-bottom {
  width: 100%;
  max-width: 1200px;
  margin: 16px auto 0 auto;
}
.hero-bottom img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Side menu */
.side-menu {
  background: #fff !important;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
  padding: 0 !important;
}
.side-menu h3 {
  position: relative;
  z-index: 1; /* keep text above decorative ::after */
  margin: 0;
  padding: 12px 80px 12px 16px; /* reserve space for chevrons on the right */
  background: #1c3794; /* deep blue */
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
/* Decorative yellow chevrons on the right of the header */
.side-menu h3::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 52px;
  background: repeating-linear-gradient(-45deg,
      #f1c40f 0, #f1c40f 14px,
      #d7ae00 14px, #d7ae00 28px);
  clip-path: polygon(0 0, 100% 0, 75% 50%, 100% 100%, 0 100%);
  z-index: 0;
}
.side-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50 !important;
  background: #fff !important;
  text-decoration: none;
  padding: 12px 14px;
  border-bottom: 1px solid #ececec;
}
.side-menu a:last-child {
  border-bottom: 0;
}
.side-menu a::before {
  content: "\25B8"; /* small right-pointing triangle */
  color: #555;
  font-size: 14px;
}
.side-menu a:hover {
  background: #f7f7f9 !important;
  color: #1c3794;
}
.side-menu a:hover::before {
  color: #1c3794;
}

/* Hotline */
.side-hotline img {
  width: 100%;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Project section */
.project-title {
  background: linear-gradient(90deg, #f1c40f, #e67e22);
  color: #fff;
  padding: 12px 20px;
  border-radius: 5px;
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Category section header */
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat-section-header .cat-title {
  position: relative;
  background: #c62828; /* deep red block */
  color: #fff;
  padding: 10px 16px 5px 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cat-section-header .cat-more {
  text-decoration: none;
  color: #0d47a1;
  font-weight: 600;
}
.cat-section-header .cat-more:hover {
  text-decoration: underline;
}

/* Projects */
/* Yellow themed sticky navbar (primary = yellow) */
.ha-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f1c40f; /* yellow primary */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}
.ha-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}
.ha-navbar .nav-link {
  color: #1a275a; /* dark blue text on yellow */
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 0;
  position: relative;
  z-index: 1; /* keep content above decorative ::before */
}
.ha-navbar .nav-link * { line-height: 1; }
.ha-navbar .nav-link:hover,
.ha-navbar .nav-link:focus {
  color: #0f1b47;
  background: rgba(35, 53, 110, 0.12); /* subtle blue tint on hover */
}
/* Blue block highlight only for active/open item */
.ha-navbar .nav-item.show > .nav-link::before,
.ha-navbar .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  background: #23356e; /* dark blue highlight block */
  pointer-events: none;
  z-index: 0;
}
.ha-navbar .nav-link i {
  width: 24px;
  text-align: center;
  font-size: 14px;
  padding: 0 !important; /* guard against page-specific icon rules */
  line-height: 1;
}
.ha-navbar .dropdown-menu {
  border: 0;
  border-radius: 12px;
  padding: 10px;
  min-width: 220px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  transform-origin: top center;
  animation: ha-dd-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ha-navbar .dropdown-item {
  border-radius: 8px;
  padding: 10px 12px;
  color: #23356e;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ha-navbar .dropdown-item:hover {
  background: rgba(35, 53, 110, 0.08);
  color: #0d2a7a;
}
.ha-navbar .dropdown-item:active {
  background: rgba(35, 53, 110, 0.12);
  color: #0d2a7a;
}
.ha-navbar .dropdown-divider {
  margin: 6px 8px;
  opacity: 0.15;
}
@keyframes ha-dd-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Keep banner visible on scroll */
.banner,
.center-img {
  transition: opacity 0.6s ease;
}

.project img {
  width: 100%;
  height: 200px; /* Chiều cao cố định */
  object-fit: cover; /* ảnh đầy khung */
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.project h4 {
  margin-top: 8px;
  text-align: center;
  font-size: 16px;
  transition: color 0.3s ease;
}

/* Hover effects for project gallery */
.project {
  overflow: hidden;
}
.project:hover img {
  transform: scale(1.06);
  filter: brightness(0.97) contrast(1.05);
}
.project:hover h4 {
  color: #e67e22;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 15px #000;
}
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}
.lightbox .close:hover {
  color: #f1c40f;
}
/*nutzalo */
.contact-buttons {
  position: fixed;
  left: 10px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
  padding: 12px; /* enlarge drag hit area */
}
/* Prevent Bootstrap .row > * from forcing full width */
.row > .contact-buttons {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.contact-buttons a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #1abc9c;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 24px;
  transition: transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  animation: shake 2s infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Hiệu ứng rung */
@keyframes shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  10% {
    transform: translate(-2px, 2px) rotate(-5deg);
  }
  20% {
    transform: translate(-2px, -2px) rotate(5deg);
  }
  30% {
    transform: translate(2px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(2px, -2px) rotate(5deg);
  }
  50% {
    transform: translate(-2px, 2px) rotate(-5deg);
  }
  60% {
    transform: translate(2px, 2px) rotate(0deg);
  }
  70% {
    transform: translate(-2px, -2px) rotate(-5deg);
  }
  80% {
    transform: translate(2px, 2px) rotate(5deg);
  }
  90% {
    transform: translate(-2px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.contact-buttons a:hover {
  transform: scale(1.2);
}

/* Tooltip */
.contact-buttons a span {
  position: absolute;
  left: 70px; /* default: show on right */
  background-color: #1abc9c;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateX(-10px);
}

.contact-buttons a:hover span {
  opacity: 1;
  transform: translateX(0);
}
/* Flip tooltip when container near right edge */
.contact-buttons.on-right a span {
  left: auto;
  right: 70px;
  transform: translateX(10px);
}
.contact-buttons.on-right a:hover span {
  transform: translateX(0);
}
/* Ensure default left side if explicitly set */
.contact-buttons.on-left a span {
  left: 70px;
  right: auto;
}
/* Show grabbing cursor while dragging */
.contact-buttons.dragging-active { cursor: grabbing; }
/* Contact buttons icons + brand colors */
.contact-buttons .contact-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain; /* prevent distortion on various DPRs */
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.contact-buttons a:nth-child(1) {
  background-color: #25D366; /* Phone/Hotline */
}
.contact-buttons a:nth-child(1) span {
  background-color: #25D366;
}
.contact-buttons a:nth-child(2) {
  background-color: #0068FF; /* Zalo */
}
.contact-buttons a:nth-child(2) span {
  background-color: #0068FF;
}
/* Reduce motion and fine-tune sizes on mobile to avoid blurry/broken icons */
@media (max-width: 575.98px) {
  .contact-buttons a {
    width: 54px;
    height: 54px;
  }
  .contact-buttons .contact-icon {
    width: 26px;
    height: 26px;
  }
}
/* Ẩn menu + hotline khi màn hình nhỏ hơn 768px */
@media (max-width: 767.98px) {
  .side-menu,
  .side-hotline {
    display: none;
  }
}
/* CSS FOOTER */
.footer {
  background-color: #222;
  color: #fff;
  padding: 40px 20px 20px 20px;
  font-family: Arial, sans-serif;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #f39c12;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}

.footer-section {
  flex: 1 1 250px;
  margin: 10px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 2px solid #f39c12;
  display: inline-block;
  padding-bottom: 5px;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  border-top: 1px solid #444;
  padding-top: 10px;
}

/* Responsive cho mobile */
@media (max-width: 767px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-section {
    margin: 15px 0;
  }
}

.product-card {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  width: 100%;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.product-card:hover {
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.product-card img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 3;
  object-fit: cover;
}

.product-card .container {
  padding: 2px 16px;
}

.product-card h4 {
  margin: 8px 0 2px;
  font-size: 16px;
  text-align: center;
}
.product-card h4 b {
  font-weight: 600;
}
.product-card p {
  margin: 0;
  text-align: center;
}
.product-card .price {
  color: #e74c3c;
  font-weight: 600;
}
