/**
 * Shared footer - same structure on all pages, colors adapt to page theme.
 * Body classes: .page-pump (red), .page-diesel (blue), .page-transport (yellow), policy pages (violet, indigo, green, orange).
 * Subtle rainbow accent at top; theme gradients; transitions.
 */

.site-footer {
  position: relative;
  padding: 2.5rem 1rem 2rem;
  border-top: none;
  overflow: hidden;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  animation: footer-fade-in 0.5s ease-out;
}

@keyframes footer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Subtle rainbow accent line at top - same palette as site */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #ea580c, #eab308, #22c55e, #0ea5e9, #6366f1, #a855f7, #dc2626);
  background-size: 400% 100%;
  animation: footer-rainbow-line 12s linear infinite;
  opacity: 0.85;
}

@keyframes footer-rainbow-line {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer::before { animation: none; background: linear-gradient(90deg, #dc2626, #6366f1, #22c55e); }
}

@media (min-width: 640px) {
  .site-footer { padding: 3rem 1.5rem 2.5rem; }
}

.site-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-footer-grid {
  display: grid;
  gap: 1.75rem;
  text-align: center;
}
@media (min-width: 640px) {
  .site-footer-grid {
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    text-align: left;
    align-items: start;
  }
}

.site-footer-brand {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.site-footer-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 1rem 0;
  line-height: 1.45;
  max-width: 36rem;
}
.site-footer-details {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  margin: 0;
}
.site-footer-details p {
  margin: 0.3rem 0;
}
.site-footer-details a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.site-footer-details a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .site-footer-links {
    align-items: flex-end;
    justify-content: flex-start;
  }
}
.site-footer-links a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 0.375rem;
  transition: color 0.2s ease, background 0.2s ease;
}
.site-footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.site-footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  transition: border-color 0.3s ease;
}

/* Theme: Pump Finder (red) – gradient for depth */
body.page-pump .site-footer {
  background: linear-gradient(180deg, #b91c1c 0%, #991b1b 50%, #7f1d1d 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: Diesel Home Delivery (blue) */
body.page-diesel .site-footer {
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: Your Easy Transport (yellow/amber) */
body.page-transport .site-footer {
  background: linear-gradient(180deg, #d97706 0%, #b45309 50%, #92400e 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: About (Violet) */
body.page-about .site-footer {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: Terms (Indigo) */
body.page-terms .site-footer {
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: Privacy (Green) */
body.page-privacy .site-footer {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 50%, #166534 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

/* Theme: Return (Orange) */
body.page-return .site-footer {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}
