/* Reset CSS cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* =========================================
   Top Bar Styling
   ========================================= */
.top-bar {
  background-color: #005a87;
  color: #ffffff;
  font-size: 13px;
  padding: 8px 0;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Khối bên trái: Email & Phone */
.top-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-link {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.top-link:hover {
  opacity: 0.8; /* Hiệu ứng mờ nhẹ khi di chuột vào link */
}

/* Icon bên trái: Màu trắng chuẩn */
.top-icon {
  stroke: #ffffff;
}

/* Mạng xã hội bên phải */
.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Các Icon Facebook, YouTube màu trắng */
.social-icon {
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon svg {
  stroke: #ffffff; /* Đảm bảo đường nét viền icon màu trắng */
}

.social-icon:hover {
  transform: translateY(-2px); /* Nổi nhẹ lên khi di chuột */
  opacity: 0.8;
}

//* =========================================
   Header & Logo Styling
   ========================================= */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px; /* Tăng nhẹ chiều cao để logo hiển thị đẹp mắt */
}

/* 1. Khung chứa đường dẫn Logo */
.logo-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0; /* Loại bỏ khoảng trống thừa bên dưới ảnh */
}

/* 2. Ảnh Logo chính */
.site-logo {
  max-height: 55px; /* Giới hạn chiều cao vừa vặn khung header */
  width: auto;      /* Giữ nguyên tỉ lệ ảnh không bị méo */
  object-fit: contain;
  
  /* Tạo hiệu ứng mượt mà khi hover */
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              filter 0.3s ease;
}

/* 3. Hiệu ứng khi rê chuột (Hover) vào Logo */
.logo-link:hover .site-logo {
  transform: scale(1.05) translateY(-2px); /* Phóng to 5% và trượt nhẹ lên trên */
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); /* Tạo bóng đổ đỏ nhẹ quanh logo */
}

/* Menu điều hướng */
.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  margin-left: 25px;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-menu a:hover, 
.nav-menu a.active {
  color: #0078bc;
}

/* =========================================
   Hero Banner với CSS Slide Animation (Mờ dần)
   ========================================= */
.hero-banner {
  position: relative; /* Làm chuẩn tọa độ cho các phần tử bên trong */
  height: 900px;
  width: 100%;
  overflow: hidden; /* Ẩn các phần ảnh thừa ra ngoài khung */
  background-color: #000; /* Nền đen để bổ trợ khi ảnh đang mờ */
}

/* 1. Khung chứa ảnh */
.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 2. Style chung cho mỗi tấm ảnh */
.slider-container .slide {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Giúp ảnh không bị méo khi co giãn */
  position: absolute; /* Đặt các ảnh đè lên nhau */
  top: 0;
  left: 0;
  opacity: 0; /* Mặc định ẩn tất cả ảnh */
  
  /* Gọi tên animation, tổng thời gian chu kỳ là 4.5s, lặp vô tận */
  animation: fadeSlider 7.5s infinite linear;
}

/* 3. Thiết lập độ trễ (delay) cho từng hình để tạo thứ tự */

/* Hình 1: Xuất hiện ngay lập tức */
.slider-container .slide:nth-child(1) {
  animation-delay: 0s;
}

/* Hình 2: Xuất hiện sau 1.5s */
.slider-container .slide:nth-child(2) {
  animation-delay: 2.5s;
}

/* Hình 3: Xuất hiện sau 3s (1.5s + 1.5s) */
.slider-container .slide:nth-child(3) {
  animation-delay: 5s;
}

/* 4. Định nghĩa hiệu ứng Animation (Fade In - Stay - Fade Out) */
@keyframes fadeSlider {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  /* Bắt đầu mờ dần vào (trong 10% đầu thời gian của hình đó) */
  2% {
    opacity: 0;
    visibility: visible;
  }
  10% {
    opacity: 1; /* Hiện rõ hoàn toàn */
  }
  /* Giữ nguyên trạng thái hiện rõ cho đến khi gần hết 1.5s */
  33.33% {
    opacity: 1;
  }
  /* Bắt đầu mờ dần ra để nhường chỗ cho hình sau */
  43.33% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* 5. Phần chữ phủ lên trên (Cập nhật lại để nằm trên cùng) */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Lớp phủ đen mờ cho chữ nổi bật */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  z-index: 10; /* Đảm bảo chữ luôn nằm trên các tấm ảnh */
}

.hero-overlay h1 {
  font-size: 32px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Thêm bóng cho chữ dễ đọc */
}

.hero-overlay h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

/* General Section */
.section {
  padding: 50px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
  color: #005a87;
}

/* =========================================
   Section Container & Cards Styling
   ========================================= */

/* Tiêu đề phần */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  color: #005a87;
  font-size: 26px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

/* Đường gạch chân trang trí dưới tiêu đề */
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #005a87;
}

.section-subtitle {
  color: #666;
  font-size: 15px;
  margin-top: 10px;
}

/* Lưới hiển thị các Card (Grid) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* Thẻ Card */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Hiệu ứng nổi lên khi di chuột vào Card */
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* Khung ảnh */
.card-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

/* Hiệu ứng Zoom ảnh khi hover vào Card */
.card:hover .card-img {
  transform: scale(1.08);
}

/* Nhãn "Nổi bật" góc ảnh */
.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #005a87;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Nội dung bên trong Card */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Giúp các nút luôn nằm bằng hàng ở đáy */
}

.card-body h3 {
  font-size: 18px;
  color: #222;
  margin-bottom: 10px;
}

.card-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Nút Xem chi tiết */
.btn-card {
  display: inline-block;
  color: #005a87;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
}

.btn-card:hover {
  color: #9a0007;
  transform: translateX(5px); /* Trượt nhẹ sang phải khi di chuột */
}

/* =========================================
   Value Commitments Section Styling
   ========================================= */

/* Phông nền xám nhẹ để tách biệt với phần trên */
.values-section {
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

/* Lưới chứa 3 ô */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Thẻ Cam kết */
.value-card {
  background: #ffffff;
  padding: 35px 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #eaeeef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Đường viền đỏ mỏng trang trí ở mép trên mỗi ô */
.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #0078BC;
  transform: scaleX(0); /* Mặc định ẩn đi */
  transition: transform 0.3s ease;
}

/* Hiệu ứng Hover vào ô Cam kết */
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.value-card:hover::before {
  transform: scaleX(1); /* Hiện đường viền đỏ khi hover */
}

/* Khung tròn chứa Icon */
.icon-wrapper {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px auto;
  background-color: #005a87; /* Nền đỏ nhạt */
  color: #fff;            /* Màu icon đỏ */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Khi hover vào ô thì icon đổi màu nổi bật hơn */
.value-card:hover .icon-wrapper {
  background-color: #0078BC;
  color: #ffffff;
  transform: rotateY(180deg); /* Xoay nhẹ icon cho sinh động */
}

/* Tiêu đề & Nội dung trong ô */
.value-card h3 {
  color: #222;
  font-size: 18px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.value-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

/* =========================================
   Google Map Section Styling
   ========================================= */
.map-section {
  width: 100%;
  line-height: 0; /* Loại bỏ khoảng trắng thừa dưới thẻ iframe */
  border-top: 3px solid #0078BC; /* Đường viền đỏ tạo ranh giới đẹp mắt */
}

.map-container {
  width: 100%;
  height: 400px;
  position: relative;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(10%) contrast(100%); /* Làm màu bản đồ dịu và ăn nhập với giao diện */
  transition: filter 0.3s ease;
}

/* Khi di chuột vào bản đồ sẽ sáng màu tự nhiên */
.map-container:hover iframe {
  filter: none;
}

/* Responsive cho thiết bị di động */
@media (max-width: 768px) {
  .map-container {
    height: 300px; /* Giảm chiều cao trên điện thoại cho đỡ chiếm diện tích */
  }
}
/* Footer */
.footer {
  background-color: #005a87;
  color: #bbb;
  padding: 30px 0 15px 0;
}

.footer h3 {
  color: #fff;
  margin-bottom: 10px;
}

.copyright {
  margin-top: 20px;
  border-top: 1px solid #c1c1c1;
  padding-top: 15px;
  text-align: center;
  font-size: 13px;
}

/* =========================================
   Floating Hotline Button (#005a87) - Slide Out Fixed
   ========================================= */
.hotline-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-direction: row-reverse; /* Số điện thoại nằm bên trái Icon */
}

/* 1. Vòng sóng lan tỏa phía sau nút */
.hotline-waves {
  position: absolute;
  width: 60px;
  height: 60px;
  background-color: rgba(0, 90, 135, 0.4);
  border-radius: 50%;
  top: 0;
  right: 0;
  animation: pulseWave 1.8s infinite ease-out;
  z-index: 1;
}

/* 2. Khung hình tròn chứa icon màu #005a87 */
.hotline-icon {
  width: 60px;
  height: 60px;
  background-color: #005a87;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 15px rgba(0, 90, 135, 0.4);
  animation: shakePhone 2s infinite ease-in-out;
  transition: transform 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0; /* Đảm bảo icon không bị bóp nghẹt */
}

.hotline-icon svg {
  stroke: #ffffff;
}

/* 3. Dải chữ chứa số điện thoại (Đã chỉnh lề không bị đè) */
.hotline-text {
  background-color: #005a87;
  color: #ffffff;
  font-weight: bold;
  font-size: 15px;
  padding: 10px 25px 10px 18px; /* Tăng khoảng padding cho chữ thoáng */
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  margin-right: -15px; /* Giảm độ đẩy sâu để chữ xích ra ngoài */
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  
  /* Cấu hình trượt ẩn/hiện */
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transform: translateX(15px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 4. Hiệu ứng HOVER: Chữ trượt ra trọn vẹn */
.hotline-btn:hover .hotline-text {
  opacity: 1;
  max-width: 220px; /* Tăng độ rộng tối đa để chứa đủ số không bị che */
  transform: translateX(0);
}

.hotline-btn:hover .hotline-icon {
  background-color: #003e5e;
  transform: scale(1.05);
}

.hotline-btn:hover .hotline-text {
  background-color: #003e5e;
}

/* =========================================
   Keyframes Animations
   ========================================= */
@keyframes pulseWave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes shakePhone {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-15deg); }
  20% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  50% { transform: rotate(0deg); }
}

@media (max-width: 480px) {
  .hotline-btn {
    bottom: 20px;
    right: 20px;
  }
}

/* =========================================
   CSS Cho Các Trang Con (Page Banner & Form)
   ========================================= */

/* Banner trên cùng của trang phụ */
.page-banner {
 background: linear-gradient(rgb(47 166 211 / 85%), rgb(0 89 180 / 85%)), 
              url('https://picsum.photos/1200/300') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 50px 0;
}

.page-banner h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

/* Lưới bố cục trang Giới thiệu & Liên hệ */
.about-grid, .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}

/* Form liên hệ */
.contact-form-wrapper {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #d32f2f;
}

.btn-submit {
  background-color: #d32f2f;
  color: #fff;
  border: none;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
}

.btn-submit:hover {
  background-color: #b71c1c;
}


/* =========================================
   About Image Slider (5 Photos with Arrows)
   ========================================= */
.about-slider-container {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  background-color: #000;
}

/* Ẩn các radio button điều khiển */
.about-slider-container input[type="radio"] {
  display: none;
}

/* Khung chứa 5 hình ảnh xếp hàng ngang */
.about-slides {
  display: flex;
  width: 500%; /* 5 hình ảnh = 500% độ rộng */
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.about-slide-item {
  width: 20%; /* Mỗi tấm ảnh chiếm 1/5 = 20% độ rộng dải */
  flex-shrink: 0;
  line-height: 0;
}

.about-slide-item img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* Xử lý trượt hình theo radio button được chọn */
#img-1:checked ~ .about-slides { transform: translateX(0%); }
#img-2:checked ~ .about-slides { transform: translateX(-20%); }
#img-3:checked ~ .about-slides { transform: translateX(-40%); }
#img-4:checked ~ .about-slides { transform: translateX(-60%); }
#img-5:checked ~ .about-slides { transform: translateX(-80%); }

/* CSS Mũi tên điều khiển (Arrows) */
.nav-group {
  display: none; /* Mặc định ẩn tất cả nhóm mũi tên */
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none; /* Tránh cản trở hover */
  z-index: 5;
}

.prev-arrow, .next-arrow {
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  pointer-events: auto; /* Kích hoạt click cho nút */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.prev-arrow:hover, .next-arrow:hover {
  background-color: #d32f2f; /* Đổi sang màu đỏ An Phát khi hover */
  transform: scale(1.1);
}

/* Hiển thị nhóm mũi tên tương ứng với từng hình đang được chọn */
#img-1:checked ~ .slider-navs .nav-group-1 { display: flex; }
#img-2:checked ~ .slider-navs .nav-group-2 { display: flex; }
#img-3:checked ~ .slider-navs .nav-group-3 { display: flex; }
#img-4:checked ~ .slider-navs .nav-group-4 { display: flex; }
#img-5:checked ~ .slider-navs .nav-group-5 { display: flex; }

/* CSS Các dấu chấm tròn (Indicators) bên dưới */
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background-color: #ffffff;
}

/* Đổi màu dấu chấm tròn tương ứng ảnh đang xem */
#img-1:checked ~ .slider-dots .dot-1,
#img-2:checked ~ .slider-dots .dot-2,
#img-3:checked ~ .slider-dots .dot-3,
#img-4:checked ~ .slider-dots .dot-4,
#img-5:checked ~ .slider-dots .dot-5 {
  background-color: #d32f2f;
  width: 22px;
  border-radius: 10px; /* Chuyển thành dạng thanh dài nhẹ */
}