/* =========================================================
   GLOBAL ANIMATIONS & FOOTER STYLES
   Added for site-wide scrolling animations and unified footer
   ========================================================= */

/* ''' Scroll Animations ''' */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.fade-up {
  transform: translateY(40px);
}

.animate-on-scroll.zoom-in {
  transform: scale(0.9);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ''' JS Typewriter Effect ''' */
.typewriter-text {
  /* No CSS hiding needed, handled by JS wrapping characters in spans */
}
.tw-word {
  display: inline-block;
  white-space: nowrap;
}
.tw-char {
  opacity: 0;
  /* We use a quick fade + slight slide for a smooth "typing" pop */
  transform: translateY(4px);
  display: inline-block;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tw-char.tw-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keep inline display inside gradient texts so WebKit background-clip works properly */
.gradient-text .tw-char,
.gradient-text-2 .tw-char {
  display: inline;
  transform: none !important;
}
.gradient-text .tw-word,
.gradient-text-2 .tw-word {
  display: inline;
  white-space: normal;
}

/* ''' Unified Footer ''' */
.site-footer {
  margin-top: 5rem;
  background: rgba(19,70,51,0.04);
  border-top: 1px solid rgba(19,70,51,0.15);
  font-family: 'Outfit', sans-serif;
  color: var(--primary-dark);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Marquee Testimonials */
.footer-testimonials {
  padding: 3rem 0;
  background: rgba(19,70,51,0.02);
  border-bottom: 1px solid rgba(19,70,51,0.1);
}

.ft-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--secondary);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollMarquee 30s linear infinite;
  gap: 2rem;
  padding: 0 1rem;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1rem)); } /* Scrolls half the duplicated content */
}

.testimonial-card {
  width: 350px;
  background: var(--bg-card);
  border: 1px solid rgba(19,70,51,0.15);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(19,70,51,0.08);
  white-space: normal;
}

.testimonial-card .t-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-card .t-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  text-align: right;
}

/* Contact Info */
.footer-contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.fc-brand { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }

.fc-brand span {
  font-weight: 300;
  opacity: 0.8;
}

.fc-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.fc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.fc-item {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fc-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.fc-link:hover {
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(19,70,51,0.15);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ''' Mobile Responsive (Footer & Marquee) ''' */
@media (max-width: 768px) {
  .site-footer { margin-top: 3rem; }

  .footer-testimonials { padding: 2rem 0; }
  .ft-title { font-size: 1.2rem; margin-bottom: 1.5rem; padding: 0 1rem; }
  .testimonial-card { width: 280px; padding: 1.25rem; }
  .testimonial-card .t-text { font-size: 0.88rem; }

  .footer-contact {
    padding: 2.5rem 1.25rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .fc-brand { font-size: 1.5rem; }
  .fc-title { font-size: 1.1rem; margin-bottom: 1rem; }
  .fc-item {
    font-size: 0.9rem;
    word-break: break-word;   /* prevent long address/email overflow */
    align-items: flex-start;
  }
  .fc-link { font-size: 0.9rem; }
  .footer-bottom { padding: 1.25rem 1rem; font-size: 0.8rem; }
}

@media (max-width: 400px) {
  .testimonial-card { width: 240px; }
  .footer-contact { padding: 2rem 1rem; }
}


/* --- Page Transitions --- */
body {
  animation: pageFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

body.page-fade-out {
  animation: pageFadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes pageFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-15px); }
}



