/* Button Variations */
.btn-primary {
  background: #1abc9c;
}

.btn-primary:hover {
  background: #16a085;
}

.btn-secondary {
  background: #e74c3c;
  pointer-events: auto;
}

.btn-secondary:hover {
  background: #c0392b;
}

.btn.btn-secondary:focus {
  outline: 2px solid #e74c3c;
  outline-offset: 2px;
}

/* Section Titles */
.section-title {
  font-size: 2rem;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
}

.fact-title {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 15px;
  position: relative;
}

/* Hero Section */
#hero {
  background: url('assets/cat-hero.jpg') no-repeat center center/cover;
  position: relative;
  padding-top: 80px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal overflow from toys */
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.hero-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  z-index: 1;
  position: relative;
  box-sizing: border-box;
}

.hero-title-box {
  background: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: inline-block;
  animation: fadeIn 1s ease-in;
}

.hero-title-box h1 {
  color: #2c3e50;
  margin: 0;
}

.hero-card p {
  font-size: 1.2rem;
  color: #333;
  margin: 15px 0;
}

.hero-buttons {
  text-align: center;
  pointer-events: auto;
}

.hero-toy {
  position: absolute;
  width: 50px;
  height: 50px;
  animation: float 3s ease-in-out infinite;
  z-index: 2;
}

.toy1 {
  top: 10%;
  left: clamp(5px, 3%, 20px); /* Constrain to stay within viewport */
  animation-delay: 0s;
}

.toy2 {
  top: 60%;
  right: clamp(5px, 3%, 20px);
  animation-delay: 1s;
}

.toy3 {
  bottom: 15%;
  left: clamp(5px, 3%, 20px);
  animation-delay: 2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@media (max-width: 768px) {
  .hero-toy {
    display: none; /* Already hidden, prevents overflow */
  }
  .hero-title-box {
    animation: none;
  }
  .hero-card {
    width: 100%;
    max-width: 90%;
    padding: 15px;
  }
  .hero-content {
    padding: 0 10px; /* Match about.html mobile padding */
  }
}

/* About Us Section */
#about {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.about-content {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.about-image, .about-text {
  flex: 1;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  max-width: 100%;
  border-radius: 5px;
}

.about-toy {
  position: absolute;
  width: 20px;
  height: 20px;
  top: 0;
  left: 0;
  z-index: 2;
  animation: rotate 15s linear infinite, floatRandom 15s ease-in-out infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatRandom {
  0% { transform: translate(0, 0); }
  20% { transform: translate(50%, 20%); } /* Reduced from 60% to stay within bounds */
  40% { transform: translate(20%, 50%); } /* Reduced from 70% */
  60% { transform: translate(50%, 30%); } /* Reduced from 80%, 50% */
  80% { transform: translate(30%, 20%); } /* Reduced from 40%, 30% */
  100% { transform: translate(0, 0); }
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
    padding: 0 10px;
  }
  .about-image img {
    max-width: 100%;
  }
  .about-toy {
    display: none; /* Already hidden, prevents overflow */
  }
  .section-title {
    text-align: center;
  }
}

/* Services Section */
#services {
  text-align: center;
  padding: 50px 20px;
  width: 100%;
  box-sizing: border-box;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.service-card.card {
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3); /* Reduced spread from 20px to 10px */
  padding: 20px;
  background: #fff;
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.service-card.card:hover {
  transform: translateY(-10px);
}

.service-card.card img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
}

.service-card.card h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin: 0 0 15px;
}

.service-card.card .btn {
  display: inline-block;
  padding: 10px 20px;
  background: #3498db;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.service-card.card .btn:hover {
  background: #2980b9;
}

@media (max-width: 768px) {
  .service-card.card {
    padding: 15px;
  }
  .service-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  #services {
    padding: 50px 10px;
  }
}

/* Facts Section */
#facts {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.facts-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.fact-card {
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.fact-card:nth-child(1) {
  background: url('assets/fact-animal-bg.jpg') no-repeat center center/cover;
}

.fact-card:nth-child(2) {
  background: url('assets/fact-business-bg.jpg') no-repeat center center/cover;
}

.fact-overlay {
  background: rgba(255, 255, 255, 0.9);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.fact-image {
  position: relative;
  z-index: 1;
}

.fact-image img {
  width: 100%;
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
}

.fact-card p {
  font-size: 1rem;
  color: #666;
  position: relative;
  z-index: 1;
}

.fact-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

.counter-item {
  flex: 1;
  min-width: 100px;
}

.counter {
  font-size: 2rem;
  color: #e74c3c;
  display: block;
  margin-bottom: 5px;
}

.counter-item p {
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 768px) {
  .facts-content {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  .fact-card {
    width: 100%;
  }
  .counter {
    font-size: 1.5rem;
  }
}

/* Image Gallery Section */
#gallery {
  text-align: center;
  padding: 50px 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Clip hover transform overflow */
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Reduced from 200px for narrower columns */
  gap: 15px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.gallery-img {
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.03); /* Reduced from 1.05 to minimize overflow */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.img1 { height: 200px; }
.img2 { height: 300px; }
.img3 { height: 250px; }
.img4 { height: 250px; }
.img5 { height: 300px; }
.img6 { height: 200px; }

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  .gallery-img {
    height: auto;
    max-height: 200px;
  }
  #gallery {
    padding: 50px 10px;
  }
}

/* Testimonials Section */
#testimonials {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.testimonial-overlay {
  background: url('assets/testimonial-bg.jpg') no-repeat center center/cover;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

.testimonial-slider {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.testimonial-item {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin: 10px 0; /* Adjusted to avoid horizontal overflow */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.testimonial-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 2px solid #e74c3c;
}

.testimonial-item p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 15px;
}

.testimonial-item h4 {
  font-size: 1.2rem;
  color: #2c3e50;
}

@media (max-width: 768px) {
  .testimonial-slider {
    padding: 0 10px;
  }
}

/* Contact Button Section */
#contact-button {
  display: none; /* Hidden by default */
}

#contact-button .btn {
  display: block;
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 768px) {
  #contact-button {
    display: block; /* Visible only on mobile */
    padding-bottom: 30px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 769px) {
  #contact-button {
    display: none; /* Explicitly hidden on desktop */
  }
}