/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,300;0,400;0,500;0,600;1,100;1,300&display=swap");

* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
  text-transform: capitalize;
  transition: .2s linear;
  -webkit-tap-highlight-color: transparent;
  /* Cho phép pinch-zoom trên mobile */
  touch-action: auto;
}

/* Banner Slider Styles */
.home {
  padding: 0;
  width: 100%;
}

.home .home-slider,
.home .swiper,
.home .swiper-wrapper,
.home .swiper-slide {
  width: 100%;
}

/* Để slide tự co theo nội dung (không ép chiều cao) */
.home .home-slider,
.home .swiper-wrapper,
.home .swiper-slide {
  height: auto !important;
}

.home .swiper-slide {
  display: flex;
  justify-content: center;
}

.home .box {
  /* Hiển thị trọn ảnh (không crop) */
  width: 100%;
  max-width: 100vw;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: #000a1f;
  position: relative;
}

.home .box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
  z-index: 1;
}

.home .box.second {
  justify-content: flex-start;
}

.home .box .content {
  display: none;
}

.home .box .content span {
  font-size: 4rem;
  color: #10221b;
}

.home .box .content h3 {
  font-size: 6rem;
  color: #219150;
  padding-top: .5rem;
  text-transform: uppercase;
}

.home .box .content p {
  line-height: 2;
  color: #10221b;
  font-size: 1.5rem;
  padding: 1rem 0;
}

.btn {
  margin-top: 1rem;
  display: inline-block;
  border: 0.2rem solid #10221b;
  color: #10221b;
  cursor: pointer;
  background: none;
  font-size: 1.7rem;
  padding: 1rem 3rem;
  border-radius: 0.5rem;
}

.btn:hover {
  background: #10221b;
  color: #fff;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.5);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 2rem;
}

/* Mobile Optimization for Slider */
@media (max-width: 768px) {
  .home .box {
    /* Tự co theo màn hình mobile, vẫn giữ trọn ảnh */
    width: 100%;
    /* Ảnh banner đang là ngang rộng -> dùng tỉ lệ ngang để tránh thừa nền trên/dưới */
    aspect-ratio: 16 / 9;
    padding: 0;
    justify-content: center;
    background-position: center !important;
  }
  
  .home .box.second {
    justify-content: center;
    background-position: center !important;
  }
  
  .home .box .content {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }
  
  .home .box .content span {
    font-size: 2.5rem;
  }
  
  .home .box .content h3 {
    font-size: 3rem;
  }
  
  .home .box .content p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .btn {
    font-size: 1.2rem;
    padding: 0.6rem 1.5rem;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 3rem;
    height: 3rem;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .home .box {
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
  }
  
  .home .box .content span {
    font-size: 2rem;
  }
  
  .home .box .content h3 {
    font-size: 2.5rem;
  }
  
  .home .box .content p {
    font-size: 0.9rem;
  }
  
  .btn {
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 1.2rem;
  }
}

/* Spacing and Transition Section */
.transition-section {
  position: relative;
  height: 100px;
  background: linear-gradient(180deg, 
    rgba(0, 10, 31, 0) 0%, 
    rgba(0, 10, 31, 0.3) 30%, 
    rgba(0, 10, 31, 0.5) 50%, 
    rgba(0, 10, 31, 0.3) 70%, 
    rgba(0, 10, 31, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 768px) {
  .transition-section {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .transition-section {
    height: 40px;
  }
}

.transition-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%);
  animation: slideIn 3s ease-in-out infinite;
}

@keyframes slideIn {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.transition-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, 
    rgba(255, 255, 255, 0.05) 0%, 
    transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

body {
  background-color: #000a1f;
  margin: 0;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.container img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.684);
  transition: transform ease-in-out 0.3s;
  /* giữ tương tác để pinch-zoom mượt hơn trên một số máy */
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.container img:hover {
  transform: scale(1.02);
}

/* Mobile optimization */
@media (max-width: 768px) {
  .container {
    padding: 0 8px;
    gap: 12px;
  }
  
  .container img {
    border-radius: 6px;
    border-width: 1px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 5px;
    gap: 8px;
  }
  
  .container img {
    border-radius: 4px;
    border-width: 1px;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 0 3px;
    gap: 6px;
  }
  
  .container img {
    border-radius: 3px;
    border-width: 1px;
  }
}

/* Floating Contact (copy from main site) */
.floating-contact {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 9999;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

.floating-contact img {
  width: 22px;
  height: 22px;
}

.floating-contact span {
  width: 50px;
  height: 50px;
  line-height: 50px;
  display: inline-block;
  font-weight: 700;
  text-transform: uppercase;
  position: absolute;
  left: 50%;
  margin-left: -25px;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  pointer-events: auto;
  color: white;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}

.floating-contact nav { font-size: 0; pointer-events: none; }
.floating-contact.expanded nav { pointer-events: auto; }

.floating-contact a {
  width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  display: inline-block;
  background-color: #ffffff;
  color: #ffffff;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease-in-out;
  margin: 0 -14px;
  box-shadow: 3px 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.floating-contact.expanded span {
  opacity: 0;
  pointer-events: none;
}

.floating-contact.expanded a {
  border-radius: 50%;
  margin: 0 7px;
  color: #667eea;
  font-size: 22px;
  opacity: 1;
  pointer-events: auto;
}

.floating-contact a:nth-child(1) {
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  margin-left: 0;
}

.floating-contact a:nth-child(1):hover { background-color: #1877f2; }
.floating-contact a:nth-child(2):hover { background-color: #00b2ff; }

.floating-contact a:nth-child(3) {
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  margin-right: 0;
}

.floating-contact a:nth-child(3):hover { background-color: #0068ff; }
.floating-contact a:nth-child(4):hover { background-color: #25d366; }

.floating-contact:hover a:hover {
  color: #fff;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .floating-contact {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
  }
  .floating-contact span,
  .floating-contact a {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
  .floating-contact span {
    cursor: pointer;
    pointer-events: auto;
    margin-left: -20px;
    font-size: 9px;
  }
  .floating-contact a {
    pointer-events: none;
    margin: 0 -11px;
  }
  .floating-contact.expanded a {
    pointer-events: auto;
    margin: 0 5.5px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .floating-contact {
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
  }
  .floating-contact span,
  .floating-contact a {
    width: 35px;
    height: 35px;
    line-height: 35px;
  }
  .floating-contact span {
    cursor: pointer;
    pointer-events: auto;
    margin-left: -17.5px;
    font-size: 8px;
  }
  .floating-contact a {
    pointer-events: none;
    margin: 0 -10px;
  }
  .floating-contact.expanded a {
    pointer-events: auto;
    margin: 0 5px;
    font-size: 16px;
  }
}