/* General Styles */
h1,
h2 {
  text-align: center;
  font-weight: bold;
  margin-bottom: 50px;
}

/* Header Styles */
.navbar-brand img {
  height: 60px;
}

.navbar-nav .dropdown-menu {
  text-align: left;
}

/* Product Section */
.carousel-card {
  width: 100%;
  min-height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
  text-align: center;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  background-color: #f0f0f0; /* Fallback color */
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

.card-link:hover .carousel-card {
  transform: scale(1.05);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  padding: 15px;
  border-radius: 10px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.card-text {
  font-size: 0.9rem;
  margin-bottom: 10px;
  overflow-wrap: break-word; /* Prevent text overflow in translations */
}

/* Testimonial Section */
.review-card {
  background-color: #2d2d2d;
  color: white;
  border-radius: 10px;
  padding: 15px;
  height: 100%;
  box-sizing: border-box;
  width: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nameIcon {
  margin-right: 10px;
}

.review-name {
  font-weight: bold;
}

.review-date {
  color: lightgray;
  margin-top: 0;
}

.star-rating {
  color: #ffd700;
}

/* Footer Section */
.contact-info {
  text-align: left;
}

.nav.flex-column {
  list-style: none;
  padding: 0;
}

.nav.flex-column .nav-link {
  display: inline-block;
}

/* Google Translate Widget Styles */
.navbar-nav #google_translate_element {
  display: inline-block !important;
  margin-left: 10px;
  min-width: 150px; /* Ensure enough space for dropdown */
  visibility: visible !important;
  z-index: 1000; /* Prevent overlap */
  position: relative;
}

.navbar-nav .goog-te-combo {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  background-color: #fff;
  font-size: 0.9rem;
  width: 100%;
  min-width: 120px;
  max-width: 200px;
  cursor: pointer;
  color: #333;
  box-shadow: none;
}

/* Fallback for Google Translate iframe */
.goog-te-banner-frame {
  display: none !important; /* Hide top banner if it appears */
}

/* Responsive Styles */
@media (max-width: 767.98px) {
  /* Header */
  .navbar-brand img {
    height: 40px;
  }
  .navbar-brand span {
    font-size: 1.2rem;
  }
  .navbar-nav .dropdown-menu {
    text-align: center;
  }
  .navbar-nav #google_translate_element {
    margin-left: 5px;
    min-width: 100px;
  }
  .navbar-nav .goog-te-combo {
    font-size: 0.8rem;
    min-width: 100px;
    max-width: 150px;
  }

  /* Product Cards */
  .carousel-card {
    min-height: 200px;
    border-radius: 10px;
  }
  .text-overlay {
    padding: 10px;
    border-radius: 10px;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .card-text {
    font-size: 0.8rem;
  }

  /* Testimonials */
  .review-card {
    padding: 15px;
    margin-bottom: 20px;
  }
  .card-header img {
    height: 40px;
  }
  .card-header .profile-details {
    font-size: 0.9rem;
  }
  .star-rating {
    font-size: 0.8rem;
  }

  /* Footer */
  .footer {
    text-align: center;
  }
  .footer .col {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .contact-info {
    text-align: center;
  }
  .contact-info .d-flex {
    justify-content: center;
    flex-wrap: wrap;
  }
  .contact-info img {
    display: block;
    margin: 0 auto 8px;
  }
  .contact-info p {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .nav.flex-column {
    align-items: center;
  }
  .nav.flex-column .nav-item {
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .navbar-nav #google_translate_element {
    margin-left: 0;
    min-width: 80px;
  }
  .navbar-nav .goog-te-combo {
    font-size: 0.75rem;
    min-width: 80px;
    max-width: 120px;
  }
}
