/* =======================================
   Color Theme Variables
======================================= */
:root {
  --primary-color: #ffffff; /* white background / header/footer */
  --secondary-color: #2563eb; /* deeper blue accent */
  --accent-color: #1e40af; /* darker blue for text/buttons */
  --tertiary-color: #10b981; /* emerald green for highlights */
}

/* =======================================
   Body & Typography
======================================= */
body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--primary-color);
  color: var(--accent-color);
}

/* =======================================
   Header
======================================= */
header a {
  text-decoration: none;
}

header nav a::before {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

header nav a:hover::before {
  width: 100%;
}

/* Mobile menu transition */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

/* =======================================
   Hero Gradient
======================================= */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    #e0f2fe 50%,
    var(--primary-color) 100%
  );
}

/* =======================================
   Buttons
======================================= */
.btn-primary {
  background-color: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

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

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--accent-color);
  border: 1px solid var(--secondary-color);
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

/* =======================================
   Card Shadows
======================================= */
.card {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

/* =======================================
   Hero Section Animations
======================================= */
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

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

.hero-stats {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out 1s forwards;
}

/* Enhanced button hover effects */
.hero-cta-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.hero-cta-btn:hover::before {
  left: 100%;
}

.hero-cta-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Interactive stats */
.stat-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-item:hover {
  transform: translateY(-10px);
}

.stat-item:hover .stat-icon {
  transform: scale(1.15) rotate(7deg);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
}

.stat-icon {
  transition: all 0.3s ease;
}

/* =======================================
   Footer
======================================= */
footer a {
  transition: color 0.3s;
}

/* Mobile specific tweaks for products page */
@media (max-width: 640px) {
  /* Reduce padding in product cards */
  .group > div.p-6 {
    padding: 1rem;
  }

  /* Adjust product image height */
  .group > div.relative.overflow-hidden > div.w-full.h-48 {
    height: 12rem; /* 192px */
  }

  /* Adjust button full width on mobile */
  .group a.inline-flex {
    width: 100%;
    justify-content: center;
  }
}

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

/* =======================================
   Mobile-Friendly "Get in Touch" Section
======================================= */
@media (max-width: 640px) {
  /* Reduce padding and font sizes for contact section */
  #contact .container .grid {
    gap: 2rem; /* Reduce gap between info and form */
  }

  /* Contact info cards */
  #contact .bg-gradient-to-br.from-white {
    padding: 1.5rem; /* Reduce padding */
  }

  #contact .group.bg-white\/80 {
    padding: 1rem; /* Smaller padding for cards */
  }

  #contact .w-16.h-16 {
    width: 3rem; /* Smaller icon containers */
    height: 3rem;
  }

  #contact .text-xl {
    font-size: 1rem; /* Smaller text in cards */
  }

  #contact .text-4xl {
    font-size: 2rem; /* Smaller heading */
  }

  /* Form adjustments */
  #contact .bg-white.rounded-3xl {
    padding: 1.5rem; /* Reduce form padding */
  }

  #contact input,
  #contact textarea {
    padding: 0.75rem 1rem; /* Smaller input padding */
    font-size: 1rem; /* Ensure readable font size */
  }

  #contact label {
    font-size: 1rem; /* Smaller labels */
  }

  #contact button[type="submit"] {
    padding: 0.75rem; /* Smaller button padding */
    font-size: 1.1rem; /* Readable button text */
  }

  /* Section title */
  #contact h2 {
    font-size: 2.5rem; /* Smaller title */
  }

  #contact p.text-xl {
    font-size: 1.1rem; /* Smaller subtitle */
  }
}

/* =======================================
   WhatsApp Floating Button
======================================= */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  min-width: 60px;
  height: 60px;
  border-radius: 30px;
  background-color: #25d366; /* WhatsApp green */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.whatsapp-float button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  flex-shrink: 0;
}

.whatsapp-float span {
  white-space: nowrap;
}

/* Pulse animation for attention */
@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

.whatsapp-float {
  animation: whatsappPulse 2s infinite;
}

/* =======================================
   WhatsApp Chat Popup
======================================= */
.whatsapp-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.whatsapp-popup.show {
  display: flex;
}

.whatsapp-popup-content {
  background-color: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.whatsapp-popup-header {
  background-color: #25d366;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whatsapp-popup-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.whatsapp-popup-body {
  padding: 20px;
}

.whatsapp-popup-body p {
  margin: 0 0 15px 0;
  color: var(--accent-color);
}

#whatsapp-message {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.send-btn {
  background-color: #25d366;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  transition: background-color 0.3s;
}

.send-btn:hover {
  background-color: #128c7e;
}

@media (max-width: 480px) {
  .whatsapp-popup-content {
    width: 95%;
    margin: 10px;
  }
}
