/* Site footer — shared on all pages via includes/footer.php */

:root {
  --footer-green: #1b3321;
}

.site-footer {
  /* ~50% of contact card height — card sits half on page, half on green footer */
  --footer-contact-half: 5.25rem;
  position: relative;
  z-index: 20;
  overflow: visible;
  margin-top: 5rem;
  color: rgba(255, 255, 255, 0.88);
  /* Top transparent (page bg shows); green from card midpoint down — like screenshot */
  background: linear-gradient(to bottom,
      transparent 0,
      transparent var(--footer-contact-half),
      var(--footer-green) var(--footer-contact-half));
}

/* Space for upper half of card that floats above the footer */
main {
  padding-bottom: var(--footer-contact-half);
}

/* Floating contact bar — centered on footer top edge (50% cut) */
.footer-contact-wrap {
  position: relative;
  z-index: 30;
  transform: translateY(-50%);
  margin-bottom: calc(-1 * var(--footer-contact-half));
  padding-bottom: 0;
}

.footer-contact-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #f5f1ea;
  border-radius: 1.35rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(27, 51, 33, 0.06);
}

.footer-contact-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--footer-green);
  flex-shrink: 0;
}

.footer-logo-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.85rem;
  background: var(--footer-green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer-logo-text strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-logo-text small {
  font-size: 0.72rem;
  color: #4b5563;
  font-weight: 500;
}

.footer-contact-grid {
  display: grid;
  gap: 1rem;
  flex: 1;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-contact-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #e8f5e9;
  color: #2e7d32;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.footer-contact-item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--footer-green);
  margin-bottom: 0.2rem;
}

.footer-contact-item p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #374151;
  margin: 0;
}

.footer-contact-item a {
  color: #374151;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact-item a[href^="mailto"] {
  color: #c45c1a;
}

.footer-contact-item a:hover {
  color: #f57c00;
}

/* Main footer columns */
.footer-main {
  position: relative;
  z-index: 1;
  padding: 1.25rem 0 2.25rem;
  background: var(--footer-green);
}

.footer-main-grid {
  display: grid;
  gap: 2rem;
}

.footer-heading {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-about-text,
.footer-cta-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
}

.footer-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.footer-social-link {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.footer-social-link:hover {
  background: #f57c00;
  color: #fff;
  transform: translateY(-2px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
}

.footer-links a:hover {
  color: #f5c882;
  padding-left: 0.25rem;
}

.footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.25s ease;
  text-decoration: none;
}

.footer-btn-primary {
  background: rgba(8, 28, 16, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.footer-btn-primary:hover {
  background: #f57c00;
  border-color: #f57c00;
}

.footer-btn-light {
  background: #fff;
  color: #1b3321;
}

.footer-btn-light:hover {
  background: #ecfdf5;
  transform: translateY(-1px);
}

/* Bottom bar + grass */
.footer-bottom {
  position: relative;
  background: var(--footer-green);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0 2.5rem;
  overflow: hidden;
}

.footer-grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(8, 28, 16, 0.55), transparent);
  pointer-events: none;
}

.footer-grass::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -38px;
  height: 100px;
  background-image: url(../images/footerbg.webp);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.footer-bottom-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-policy-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-policy-links a:hover {
  color: #f5c882;
}

/* Floating social sidebar */
.footer-float-social {
  position: fixed;
  right: 0;
  top: 65%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--footer-green);
  padding: 0.65rem 0.45rem;
  border-radius: 0.75rem 0 0 0.75rem;
  box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.15);
}

.footer-float-social a {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.95rem;
  border-radius: 0.4rem;
  transition: background 0.2s;
}

.footer-float-social a:hover {
  background: #f57c00;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 45;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: none;
  background: #2e7d32;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #f57c00;
}

@media (min-width: 768px) {
  .site-footer {
    --footer-contact-half: 2.85rem;
  }

  .footer-contact-card {
    flex-direction: row;
    align-items: center;
    padding: 1.4rem 1.65rem;
    gap: 1.75rem;
  }

  .footer-contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .footer-main {
    padding-top: 2rem;
  }

  .footer-main-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem;
    padding-top: 4rem;
  }

  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .site-footer {
    --footer-contact-half: 7rem;
  }

  .footer-main {
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
  }

  .footer-main-grid {
    grid-template-columns: 1.25fr 0.85fr 1fr;
    gap: 2.75rem;
  }

  .footer-float-social {
    display: flex;
  }

  .back-to-top {
    right: 3.25rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 1023px) {
  .footer-float-social {
    display: none;
  }
}