/* ===== 1. CÀI ĐẶT BIẾN TRUNG TÂM & RESET ===== */
:root {
  --font-primary: "Roboto", sans-serif;
  --font-display: "Playfair Display", serif;
  --color-light: #ffffff;
  --color-dark: #212529;
  --color-primary: #d9a474; /* Một màu vàng cát/đồng sang trọng */
  --color-overlay: rgba(0, 0, 0, 0.65);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--color-dark);
  line-height: 1.7;
}

/* ===== 2. UTILITIES & HIỆU ỨNG CHUNG ===== */
.page-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 3. CÁC COMPONENT CHÍNH ===== */

/* HERO SECTION */
.hero {
  height: 90vh;
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.5rem);
  color: var(--color-light);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.hero-text p {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  color: rgba(255, 255, 255, 0.9);
}

/* DETAILED CATEGORY SECTIONS */
.category-feature-section {
  position: relative;
  padding: 100px 0;
  overflow: hidden; /* Cực kỳ quan trọng */
}

.category-feature__background {
  position: absolute;
  inset: -5%; /* Lớn hơn section một chút để hiệu ứng zoom không lộ cạnh */
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--transition-smooth);
  z-index: 1;
}

.category-feature-section:hover .category-feature__background {
  transform: scale(1.05);
}

.category-feature__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  z-index: 2;
}

.category-feature__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 50%;
}

.category-feature__content--align-right {
  margin-left: auto;
  text-align: right;
}

.category-feature__content--align-left {
  margin-right: auto;
  text-align: left;
}

.category-feature__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--color-light);
  margin-bottom: 1rem;
}

.category-feature__description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
}

.category-feature__list-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 30px;
  margin-bottom: 2rem;
}

.category-feature__content--align-right .category-feature__list-wrapper {
  direction: rtl;
}

.category-feature__content--align-right .category-feature__list {
  direction: ltr;
  text-align: right;
}

.category-feature__list {
  list-style: none;
}

.category-feature__list a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 5px;
  transition: color var(--transition-smooth);
}

.category-feature__list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-primary);
  transition: width var(--transition-smooth);
}

.category-feature__list a:hover,
.category-feature__list a:focus-visible {
  color: var(--color-light);
}

.category-feature__list a:hover::after,
.category-feature__list a:focus-visible::after {
  width: 100%;
}

/* Nút CTA biến thể sáng màu */
.btn-cta--light {
  display: inline-block; /* Đảm bảo padding và transform hoạt động đúng */
  background: transparent;
  color: var(--color-light);
  border: 2px solid var(--color-primary);
  padding: 12px 32px;
  text-decoration: none;
  font-weight: 700;
  border-radius: 50px;
  transition: all var(--transition-smooth);
}

.btn-cta--light:hover,
.btn-cta--light:focus-visible {
  background: var(--color-primary);
  color: var(--color-dark);
  transform: translateY(-3px);
}

.btn-cta--light:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* CARD COMPONENT (Base styles) */
.card {
  background-color: var(--color-light); /* Hoặc màu nền phù hợp khác */
  border-radius: 8px; /* Ví dụ bo góc */
  overflow: hidden; /* Để img không tràn ra ngoài nếu có bo góc */
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.1); */ /* Ví dụ đổ bóng */
}

.card img {
  width: 100%;
  height: 200px; /* Chiều cao cơ bản, sẽ được ghi đè bởi media queries */
  object-fit: cover; /* Đảm bảo ảnh phủ kín mà không bị méo */
  display: block; /* Loại bỏ khoảng trống thừa dưới ảnh */
}

/* ===== 4. RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
  .page-container {
    max-width: 960px;
  }

  .category-feature__content {
    max-width: 60%;
  }
}

@media (max-width: 992px) {
  .page-container {
    max-width: 720px;
  }

  /* Điều chỉnh kích thước ảnh cho tablet */
  .card img {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .page-container {
    max-width: 540px;
  }

  .hero {
    height: 75vh;
  }

  .category-feature-section {
    padding: 70px 0;
  }

  .category-feature__content {
    max-width: 100%;
    text-align: left;
    margin: 0 auto;
    padding: 0 15px;
  }

  .category-feature__description {
    font-size: 1rem;
  }

  .category-feature__list-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 15px;
  }

  .btn-cta--light {
    padding: 10px 25px;
    font-size: 0.95rem;
  }

  /* Điều chỉnh kích thước ảnh cho mobile lớn */
  .card img {
    height: 160px;
  }
}

@media (max-width: 576px) {
  .hero {
    height: 60vh;
    min-height: 400px;
  }

  .hero-text h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
  }

  .hero-text p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 1rem;
  }

  .category-feature-section {
    padding: 50px 0;
  }

  .category-feature__title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 0.75rem;
  }

  .category-feature__description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .category-feature__list-wrapper {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-feature__list a {
    font-size: 0.9rem;
  }

  /* Điều chỉnh kích thước ảnh cho mobile nhỏ */
  .card img {
    height: 140px;
  }
}

@media (max-width: 360px) {
  .hero-text h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }

  .category-feature-section {
    padding: 40px 0;
  }

  .btn-cta--light {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  /* Điều chỉnh kích thước ảnh cho mobile rất nhỏ */
  .card img {
    height: 120px;
  }
}
