/* Featured News Element Styles */

.featured-news-wrapper {
  width: 100%;
  max-width: 100%;
  position: relative;
  padding: 40px 0; /* Giảm padding ngang xuống 0 */
  margin-bottom: 40px;
  overflow: hidden; /* Ngăn tràn nội dung */
}

/* Header */
.featured-news-header {
  margin-bottom: 30px;
  padding: 0 20px; /* Thêm padding ngang cho header */
}

.featured-news-heading {
  font-size: 28px;
  font-weight: 700;
  color: #168BEF;
  text-align: center;
  position: relative;
  display: inline-block;
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Slider Container - Sửa lại cấu trúc */
.featured-news-slider {
  display: flex;
  overflow: hidden;
  transition: transform 0.5s ease;
  max-width: 100%; /* Giới hạn chiều rộng tối đa */
  margin: 0 auto; /* Căn giữa slider */
  width: 100%; /* Sử dụng toàn bộ chiều rộng khả dụng */
}

/* News Item - Điều chỉnh kích thước item */
.featured-news-item {
  min-width: calc(33.333% - 30px);
  margin: 0 15px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%; /* Đảm bảo item sử dụng toàn bộ không gian được cấp */
  max-width: 400px; /* Giới hạn kích thước tối đa của mỗi item */
  flex: 0 0 auto; /* Ngăn item co dãn */
}

.featured-news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Image */
.featured-news-image-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.featured-news-image {
  height: 220px; /* Increased from 180px to 220px */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  transition: all 0.5s ease;
}

.featured-news-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
}

.featured-news-item:hover .featured-news-image {
  transform: scale(1.05);
}

.featured-news-item:hover .featured-news-image-overlay {
  background-color: rgba(22, 139, 239, 0.2);
}

/* Content */
.featured-news-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.featured-news-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 15px;
}

.featured-news-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.featured-news-title a:hover {
  color: #168BEF;
}

.featured-news-description {
  color: #666666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Footer & Button */
.featured-news-footer {
  margin-top: auto;
  display: block;
}

/* IMPROVED TECH BUTTON STYLES */
.featured-news-wrapper .featured-news-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 16px !important; /* Giảm padding */
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  background-image: none !important;
  line-height: normal !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
  transition: color 0.3s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  max-width: 100% !important; /* Giới hạn chiều rộng tối đa */
  white-space: nowrap !important;
}

/* Default button style - Filled */
.featured-news-wrapper .featured-news-button-filled {
  background-color: #168BEF !important;
  color: #ffffff !important;
  border: none !important;
  padding-right: 14px !important; /* Giảm padding */
  padding-left: 16px !important; /* Giảm padding */
}

.featured-news-wrapper .featured-news-button-filled::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, #0F5FAB 0%, #0B7BD1 100%) !important;
  transition: left 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) !important;
  z-index: -1 !important;
}

.featured-news-wrapper .featured-news-button-filled:hover::before {
  left: 0 !important;
}

.featured-news-wrapper .featured-news-button-filled:hover {
  box-shadow: 0 5px 15px rgba(22, 139, 239, 0.3) !important;
  transform: translateY(-2px) !important;
}

/* Icon styling - Giảm kích thước icon */
.featured-news-wrapper .featured-news-button .button-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.featured-news-wrapper .featured-news-button .button-text {
  position: relative !important;
  z-index: 2 !important;
  font-size: 13px !important; /* Giảm font size */
  max-width: calc(100% - 30px) !important; /* Giới hạn chiều rộng */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.featured-news-wrapper .featured-news-button .button-icon-right {
  margin-left: 6px !important; /* Giảm margin */
  width: 20px !important; /* Giảm kích thước */
  height: 20px !important; /* Giảm kích thước */
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 2 !important;
  transition: transform 0.3s ease, background-color 0.3s ease !important;
  flex-shrink: 0 !important; /* Không cho phép co lại */
}

/* Icon animation on hover */
.featured-news-wrapper .featured-news-button:hover .button-icon-right {
  transform: translateX(3px) !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
}

/* Ensure icons display correctly */
.featured-news-wrapper .featured-news-button .button-icon-right i {
  font-size: 10px !important; /* Giảm font size */
  color: #ffffff !important;
  display: inline-block !important;
}

/* Outline button style */
.featured-news-wrapper .featured-news-button-outline {
  background-color: transparent !important;
  color: #168BEF !important;
  border: 1px solid #168BEF !important;
}

.featured-news-wrapper .featured-news-button-outline::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, rgba(22, 139, 239, 0.1) 0%, rgba(22, 139, 239, 0.2) 100%) !important;
  transition: left 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) !important;
  z-index: -1 !important;
}

.featured-news-wrapper .featured-news-button-outline:hover::before {
  left: 0 !important;
}

.featured-news-wrapper .featured-news-button-outline .button-icon-right {
  background-color: rgba(22, 139, 239, 0.1) !important;
}

.featured-news-wrapper .featured-news-button-outline .button-icon-right i {
  color: #168BEF !important;
}

/* Link button style */
.featured-news-wrapper .featured-news-button-link {
  background-color: transparent !important;
  color: #168BEF !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.featured-news-wrapper .featured-news-button-link:hover {
  color: #0e6bbd !important;
}

.featured-news-wrapper .featured-news-button-link .button-icon-right {
  background-color: transparent !important;
}

.featured-news-wrapper .featured-news-button-link .button-icon-right i {
  color: #168BEF !important;
}

.featured-news-wrapper .featured-news-button-link:hover .button-icon-right i {
  color: #0e6bbd !important;
}

/* Advanced button effect */
@keyframes buttonGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 139, 239, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(22, 139, 239, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 139, 239, 0);
  }
}

.featured-news-wrapper .featured-news-button-filled:active {
  animation: buttonGlow 0.8s;
}

/* Navigation - Điều chỉnh vị trí navigation */
.featured-news-arrows {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 20px); /* Giảm chiều rộng để arrows không tràn ra ngoài */
  pointer-events: none;
  z-index: 10;
  left: 10px; /* Căn đều hai bên */
  right: 10px;
}

.featured-news-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333333;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  pointer-events: auto;
  opacity: 0.7;
}

.featured-news-prev {
  left: 5px;
  position: absolute;
}

.featured-news-next {
  right: 5px;
  position: absolute;
}

.featured-news-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.featured-news-dot {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background-color: #d4d4d4;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.featured-news-dot.active {
  background-color: #168BEF;
  transform: scale(1.2);
}

/* Special Effects */
@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.featured-news-item.slide-in {
  animation: slideIn 0.5s forwards;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.featured-news-item.fade-in {
  animation: fadeIn 0.5s forwards;
}

/* Responsive - Tinh chỉnh responsive tốt hơn */
@media (max-width: 991px) {
  .featured-news-item {
    min-width: calc(50% - 30px);
    max-width: 350px; /* Giảm kích thước tối đa trên tablet */
  }
  
  .featured-news-heading {
    font-size: 24px;
  }
  
  .featured-news-image {
    height: 200px;
  }
  
  .featured-news-wrapper .featured-news-button {
    padding: 6px 14px !important;
  }
  
  .featured-news-wrapper .featured-news-button .button-text {
    font-size: 12px !important;
  }
  
  .featured-news-wrapper .featured-news-button .button-icon-right {
    width: 18px !important;
    height: 18px !important;
  }
}

@media (max-width: 767px) {
  .featured-news-item {
    min-width: calc(100% - 30px);
    max-width: 100%; /* Chiếm toàn bộ chiều rộng trên mobile */
    margin: 0 10px; /* Giảm margin ngang */
  }
  
  .featured-news-heading {
    font-size: 22px;
  }
  
  .featured-news-arrow {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .featured-news-image {
    height: 180px;
  }
  
  .featured-news-wrapper .featured-news-button {
    padding: 5px 12px !important;
  }
  
  .featured-news-wrapper .featured-news-button .button-text {
    font-size: 12px !important;
  }
  
  .featured-news-wrapper .featured-news-button .button-icon-right {
    width: 16px !important;
    height: 16px !important;
    margin-left: 4px !important;
  }
  
  .featured-news-wrapper .featured-news-button .button-icon-right i {
    font-size: 9px !important;
  }
} 