/* Enhanced Footer CSS - Alberta Tradesman Theme */

/* ===== Modern Footer Design ===== */
.footer {
  background: linear-gradient(135deg, var(--color-dark-gray) 0%, var(--color-charcoal) 100%);
  color: white;
  padding: 5rem 2rem 2rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

/* Animated Background Pattern */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M50 30c11.046 0 20 8.954 20 20s-8.954 20-20 20-20-8.954-20-20 8.954-20 20-20zm0 5c-8.284 0-15 6.716-15 15s6.716 15 15 15 15-6.716 15-15-6.716-15-15-15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: pattern-slide 30s linear infinite;
  opacity: 0.5;
}

@keyframes pattern-slide {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

/* Top Gradient Border */
.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background: linear-gradient(90deg, var(--color-sky-blue) 0%, var(--color-burnt-orange) 50%, var(--color-sky-blue) 100%);
  }
  50% {
    background: linear-gradient(90deg, var(--color-burnt-orange) 0%, var(--color-sky-blue) 50%, var(--color-burnt-orange) 100%);
  }
}

/* Footer Content Grid */
.footer-content {
  max-width: 1400px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* Footer Sections */
.footer-content > div {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer-content > div::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(43, 108, 176, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.footer-content > div:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-content > div:hover::before {
  opacity: 1;
}

/* Footer Headings */
.footer h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.footer h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: width-pulse 2s ease-in-out infinite;
}

@keyframes width-pulse {
  0%, 100% { width: 50px; }
  50% { width: 80px; }
}

/* Footer Text */
.footer p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Footer Links (if any) */
.footer a {
  color: var(--color-sky-blue);
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  display: inline-block;
}

.footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-burnt-orange);
  transition: width 0.3s;
}

.footer a:hover {
  color: var(--color-burnt-orange);
}

.footer a:hover::after {
  width: 100%;
}

/* Email with Icon Effect */
.footer p:contains("@") {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  margin-top: 2rem;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: var(--gradient-primary);
  animation: expand-line 3s ease-in-out infinite;
}

@keyframes expand-line {
  0%, 100% {
    width: 100px;
    opacity: 0.5;
  }
  50% {
    width: 200px;
    opacity: 1;
  }
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
  animation: fade-in 1s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Copyright Symbol Enhancement */
.footer-bottom p::before {
  content: '⚡ ';
  color: var(--color-burnt-orange);
  animation: flash 2s ease-in-out infinite;
}

.footer-bottom p::after {
  content: ' ⚡';
  color: var(--color-burnt-orange);
  animation: flash 2s ease-in-out infinite;
}

@keyframes flash {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Floating Construction Icons Background */
.footer-content::before {
  content: '🔨';
  position: absolute;
  top: 20px;
  right: 50px;
  font-size: 2rem;
  opacity: 0.1;
  animation: float-icon 6s ease-in-out infinite;
}

.footer-content::after {
  content: '🏗️';
  position: absolute;
  bottom: 20px;
  left: 50px;
  font-size: 2rem;
  opacity: 0.1;
  animation: float-icon 6s ease-in-out infinite 3s;
}

@keyframes float-icon {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(5deg);
  }
  75% {
    transform: translateY(5px) rotate(-5deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .footer {
    padding: 3rem 1rem 1rem;
    margin-top: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content > div {
    padding: 1.5rem;
  }

  .footer h3 {
    font-size: 1.25rem;
  }

  .footer p {
    font-size: 0.95rem;
  }

  .footer-bottom {
    padding-top: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }
}

/* Dark Theme Enhancement for Footer */
@media (prefers-color-scheme: light) {
  .footer {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  }
}

/* Smooth Scroll Target */
.footer:target {
  scroll-margin-top: 80px;
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
  .footer::before,
  .footer::after,
  .footer-content::before,
  .footer-content::after,
  .footer h3::after,
  .footer-bottom::before,
  .footer-bottom p::before,
  .footer-bottom p::after {
    animation: none !important;
  }

  .footer-content > div {
    transition: none !important;
  }
}