:root {
  --primary-bg: #000000;
  --text-color: #ffffff;
  --accent-color: #ffd700;
  --secondary-color: #333333;
  --border-color: #444444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header Styles */
.navbar {
  background-color: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-color) !important;
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  margin: 0 0.6rem; /* Giảm margin từ 1rem xuống 0.6rem */
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem 0 !important;
  white-space: nowrap; /* Ngăn xuống dòng */
  font-size: 1rem; /* Thu nhỏ nhẹ font size */
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--accent-color) !important;
}

.navbar-nav .nav-link.active::after {
  width: 100%;
}

/* Search Styles */
.search-input {
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 25px 0 0 25px;
}

.search-input:focus {
  background-color: var(--secondary-color);
  border-color: var(--accent-color);
  color: var(--text-color);
  box-shadow: none;
}

.search-btn {
  background-color: var(--accent-color);
  border: 1px solid var(--accent-color);
  color: var(--primary-bg);
  border-radius: 0 25px 25px 0;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background-color: #ffed4e;
  border-color: #ffed4e;
  color: var(--primary-bg);
}

.search-input::placeholder {
  color: #cccccc;
  opacity: 1;
}

.search-input::-webkit-input-placeholder {
  color: #cccccc;
}

.search-input::-moz-placeholder {
  color: #cccccc;
}

/* Banner Styles */
.hero-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 1s ease 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 1rem auto;
}

/* About Section */
.about-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-image {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

/* Product Grid - dùng Bootstrap row/col, không custom grid */
#products-container {
  margin-top: 2rem;
}

.product-item {
  display: flex;
  align-items: stretch;
  margin-bottom: 2rem;
}

@media (max-width: 767.98px) {
  .product-item {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .product-item {
    flex: 1 1 48%;
    max-width: 48%;
  }
}

@media (min-width: 1200px) {
  .product-item {
    flex: 1 1 31%;
    max-width: 31%;
  }
}

/* Product Card Redesign */
.product-card {
  background: #232323;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.3s,
    transform 0.3s;
  height: 100%;
}
.product-card:hover {
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.18);
  transform: translateY(-6px) scale(1.03);
  border: 1.5px solid var(--accent-color);
}
.product-card .card-image {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: #181818;
  padding: 1.5rem;
  border-bottom: 1px solid #333;
  display: block;
}
.product-card .card-body {
  padding: 1.2rem 1.2rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.product-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  min-height: 2.5em;
}
.product-card .card-category {
  color: var(--accent-color);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.product-card .card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}
.product-card .card-description {
  color: #ccc;
  font-size: 0.97rem;
  margin-bottom: 1rem;
  min-height: 2.5em;
  flex-grow: 1;
}
.product-card .d-flex {
  gap: 0.5rem;
}
.product-card .btn-primary {
  font-size: 1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
}
.product-card .btn-outline-primary {
  padding: 0.5rem 0.9rem;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Project & Product Cards */
.project-card,
.product-card {
  background-color: var(--secondary-color);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.project-card:hover,
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
  border-color: var(--accent-color);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
  display: block;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--secondary-color);
  background-image:
    linear-gradient(45deg, #333 25%, transparent 25%),
    linear-gradient(-45deg, #333 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #333 75%),
    linear-gradient(-45deg, transparent 75%, #333 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0px;
}

.card-image:hover {
  filter: brightness(1.1);
}

/* Image loading state */
.card-image[src=""],
.card-image:not([src]) {
  background-image: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.project-card:hover .card-image,
.product-card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.card-category {
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.card-category i {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.card-description {
  color: #cccccc;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Button Styles */
.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-bg);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #ffed4e;
  border-color: #ffed4e;
  color: var(--primary-bg);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-outline-primary {
  border-color: var(--accent-color);
  color: var(--accent-color);
  border-radius: 25px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-bg);
}

/* Footer Styles */
.footer {
  background-color: #111111;
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border-color);
}

.footer h5,
.footer h6 {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: var(--primary-bg);
  transform: translateY(-3px);
}

.footer-divider {
  border-color: var(--border-color);
  margin: 2rem 0 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info i {
  color: var(--accent-color);
  width: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar-nav .nav-link {
    margin: 0;
    padding: 0.5rem 0 !important;
  }
}

/* Form Styles */
.form-control {
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 10px;
}

.form-control:focus {
  background-color: var(--secondary-color);
  border-color: var(--accent-color);
  color: var(--text-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.form-label {
  color: var(--text-color);
  font-weight: 500;
}

/* Loading Animation */
.loading {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Project Filter Styles */
.filter-btn {
  border-color: var(--accent-color);
  color: var(--accent-color);
  border-radius: 25px;
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  background-color: transparent;
}

.filter-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-bg);
}

.filter-btn.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-bg);
}

/* Ensure consistent card layout */
.project-card {
  min-height: 450px;
}

.project-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.project-card .card-description {
  flex-grow: 1;
  margin-bottom: 1rem;
}

/* Product Card Specific Styles */
.product-card {
  min-height: 480px;
}

.product-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
}

.product-card .card-description {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.card-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-color);
  margin: 0.5rem 0;
}
