/* ===========================================
   ADOPT-A-DOG PAGE STYLES
   =========================================== */

/* Animal Gallery Layout */
.animal-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 40px 20px;
  animation: galleryFadeIn 0.8s ease-out forwards;
  justify-items: center;
}

/* Gallery entrance animation */
@keyframes galleryFadeIn {
  0% { 
    opacity: 0;
    transform: translateY(20px);
  }
  100% { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for attention */
@keyframes gentlePulse {
  0% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); }
  50% { box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15); }
  100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); }
}

/* Card entrance animation */
@keyframes cardEntrance {
  0% { 
    opacity: 0;
    transform: translateX(-100px) rotateZ(-15deg) scale(0.7);
  }
  60% {
    opacity: 0.9;
    transform: translateX(10px) rotateZ(5deg) scale(1.05);
  }
  100% { 
    opacity: 1;
    transform: translateX(0) rotateZ(0deg) scale(1);
  }
}

/* Animal Card Styling */
.animal-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  background-color: var(--white);
  border: #388e3c solid 1px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s;
  animation: 
    cardEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    gentlePulse 3s ease-in-out infinite 1s;
  animation-delay: calc(var(--card-index, 0) * 0.15s);
  opacity: 0;
}

.animal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.1) 0%, 
    rgba(46, 125, 50, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.animal-card::after {
  content: "🐾 Click to Adopt Me! 🐾";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(76, 175, 80, 0.95);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  backdrop-filter: blur(10px);
}

.animal-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
  transform: translateY(-5px);
}

.animal-card:hover::before {
  opacity: 1;
}

.animal-card:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

/* Image Styling */
.animal-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  position: relative;
  z-index: 0;
  border-bottom: 2px solid var(--primary-green);
}

.animal-card:hover .animal-img {
  transform: scale(1.05);
  filter: brightness(1.1) contrast(1.1);
}

/* Info Section */
.animal-info {
  padding: 12px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  padding: 15px 20px;
  font-size: 1rem;
  color: var(--text-main);
}

.animal-card:hover .animal-info {
  transform: translateY(-2px);
}

.animal-info h3 {
  margin: 0 0 6px;
  color: #2e7d32;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  font-weight: 600;
}

.animal-card:hover .animal-info h3 {
  color: #1b5e20;
  transform: translateX(3px);
}

.animal-info p {
  margin: 3px 0;
  font-size: 0.9rem;
  color: #444;
  transition: all 0.3s ease;
}

.animal-card:hover .animal-info p {
  color: #333;
  transform: translateX(2px);
}

.animal-info strong {
  color: #555;
}

/* Intro and Quote */
.adopt-intro {
  max-width: 800px;
  margin: 10px auto 5px;
  font-size: 1.05rem;
  color: #555;
  text-align: center;
  font-style: italic;
}

section > p {
  text-align: center;
  max-width: 800px;
  margin: 30px auto 20px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #444;
}

.highlight-quote {
  max-width: 800px;
  margin: 20px auto;
  padding: 16px 24px;
  margin-bottom: -20px;
  font-style: italic;
  background-color: #f1f1f1;
  border-left: 6px solid var(--primary-green, #2e7d32);
  color: #444;
  text-align: center;
  font-size: 1.05rem;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.highlight-quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(76, 175, 80, 0.1),
    transparent
  );
  transition: left 0.6s ease;
}

.highlight-quote:hover::before {
  left: 100%;
}

.highlight-quote:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #2e7d32;
  background-color: #f8f9fa;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  z-index: 2000;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: white;
  margin: 25px auto;
  padding: 10px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: fadeIn 0.4s ease-in;
  background-color: #fff;
  margin: 5% auto;
  padding: 24px 20px;
  border-radius: 10px;
  width: 98%;
  max-width: 700px;
  box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  font-size: 1.15rem;
  color: #222;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  color: #222;
  box-sizing: border-box;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  top: 10px;
  right: 18px;
  z-index: 10;
}

.close:hover {
  color: #000;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-top: 6px;
  margin-bottom: 4px;
  margin-bottom: 6px;
  color: var(--primary-green, #2e7d32);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px;
  font-size: 0.95rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .animal-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 30px 15px;
  }
}

@media (max-width: 768px) {
  .animal-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px 15px;
  }
  
  .animal-card::after {
    font-size: 0.8rem;
    padding: 10px 16px;
  }
  
  .animal-img {
    height: 160px;
  }
  
  .animal-info {
    padding: 10px;
  }
  
  .animal-card:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

@media (max-width: 480px) {
  .animal-gallery {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px 10px;
  }
}
