:root {
  /* Brand Colors - Aligned with website */
  --footer-primary: #004799;
  --footer-primary-light: #0066cc;
  --footer-secondary: #ffbf00;
  --footer-secondary-light: #ffd633;

  /* Footer Dark Theme */
  --footer-bg-dark: #0a0e1a;
  --footer-bg-darker: #060913;
  --footer-text: #ffffff;
  --footer-text-muted: #ffffff;
  --footer-border: rgba(226, 232, 240, 0.1);

  /* Apple-Style Shadows */
  --footer-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --footer-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --footer-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --footer-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.6);
  --footer-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);

  /* Transitions */
  --footer-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --footer-transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --footer-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer Main Container */
footer {
  background: linear-gradient(180deg, var(--footer-bg-dark) 0%, var(--footer-bg-darker) 100%);
  color: var(--footer-text);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--footer-secondary) 50%,
    transparent 100%);
  opacity: 0.3;
}

/* Footer Section Container */
.footer-main {
  padding: 80px 0 60px;
  position: relative;
}

.footer-section {
  opacity: 0;
  animation: footerFadeIn 0.8s ease forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes footerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Styling */
.footer-logo {
  height: 80px;
  width: auto;
  filter: brightness(1.1) drop-shadow(0 4px 12px rgba(255, 191, 0, 0.3));
  transition: all var(--footer-transition-base);
  margin-bottom: 24px;
}

.footer-logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2) drop-shadow(0 8px 20px rgba(255, 191, 0, 0.4));
}

/* Section Headings */
.footer-section h5,
.footer-section h6 {
  color: var(--footer-text);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}

.footer-section h5::after,
.footer-section h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--footer-secondary) 0%, var(--footer-text) 100%);
  border-radius: 2px;
}

.footer-section h5 {
  font-size: 1.25rem;
}

.footer-section h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Church Description */
.footer-description {
  color: var(--footer-text-muted);
  line-height: 1.7;
  font-size: 0.938rem;
  margin-bottom: 32px;
}

/* Social Media Section */
.social-links-section {
  margin-top: 32px;
}

.social-links-section h6 {
  margin-bottom: 20px;
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--footer-text);
  font-size: 1.125rem;
  transition: all var(--footer-transition-base);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--footer-primary);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.social-link:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--footer-primary);
  box-shadow: 0 8px 20px rgba(0, 71, 153, 0.3);
  color: white;
}

.social-link:active::before {
  width: 100px;
  height: 100px;
}

.social-link i {
  position: relative;
  z-index: 1;
}

/* Navigation Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 0.938rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--footer-transition-fast);
  position: relative;
  padding-left: 0;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-secondary) 100%);
  bottom: -2px;
  transition: width var(--footer-transition-base);
}

.footer-links a:hover {
  color: var(--footer-text);
  padding-left: 12px;
}

.footer-links a:hover::before {
  width: 30px;
}

/* Contact Information */
.contact-info {
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all var(--footer-transition-base);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.contact-item i {
  color: var(--footer-secondary);
  font-size: 1rem;
  min-width: 20px;
  margin-top: 2px;
}

.contact-item a,
.contact-item span {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 0.938rem;
  line-height: 1.5;
  transition: color var(--footer-transition-fast);
}

.contact-item a:hover {
  color: var(--footer-text);
}

/* Prayer Times Card */
.prayer-times {
  background: linear-gradient(135deg,
    rgba(0, 71, 153, 0.1) 0%,
    rgba(255, 191, 0, 0.05) 100%);
  border: 1px solid rgba(255, 191, 0, 0.2);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.prayer-times::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--footer-secondary) 0%,
    var(--footer-text) 100%);
}

.prayer-times h6 {
  margin-bottom: 20px;
  color: var(--footer-text);
}

.prayer-times h6::after {
  display: none;
}

.prayer-schedule {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prayer-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--footer-text-muted);
  transition: all var(--footer-transition-fast);
}

.prayer-time-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.prayer-time-pill i {
  color: var(--footer-secondary);
  font-size: 0.875rem;
}

/* Bottom Footer */
.footer-bottom {
  background: var(--footer-bg-darker);
  padding: 24px 0;
  border-top: 1px solid var(--footer-border);
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 191, 0, 0.2) 50%,
    transparent 100%);
}

.copyright-text {
  color: var(--footer-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.copyright-text span {
  color: var(--footer-secondary);
  font-weight: 600;
}

/* Back to Top Button - Apple Style */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background: rgba(0, 71, 153, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--footer-transition-base);
  z-index: 1000;
  box-shadow: var(--footer-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  background: var(--footer-primary);
  box-shadow: 0 12px 28px rgba(0, 71, 153, 0.4);
}

#back-to-top:active {
  transform: translateY(-2px) scale(0.95);
}

#back-to-top i {
  color: white;
  font-size: 1.25rem;
  transition: transform var(--footer-transition-base);
}

#back-to-top:hover i {
  transform: translateY(-2px);
}

/* Responsive Design - Apple Approach */
@media (max-width: 1024px) {
  .footer-main {
    padding: 60px 0 48px;
  }

  .social-links-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .social-link {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .footer-main {
    padding: 48px 0 36px;
  }

  .footer-logo {
    height: 70px;
    margin-bottom: 20px;
  }

  .footer-section h5 {
    font-size: 1.125rem;
  }

  .footer-section h6 {
    font-size: 0.938rem;
  }

  .social-links-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }

  .social-link {
    width: 42px;
    height: 42px;
    font-size: 0.938rem;
  }

  .prayer-times {
    padding: 20px;
  }

  #back-to-top {
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 576px) {
  .footer-main {
    padding: 40px 0 32px;
  }

  .footer-logo {
    height: 60px;
  }

  .footer-section {
    text-align: center;
    margin-bottom: 36px;
  }

  .footer-section h5::after,
  .footer-section h6::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
  }

  .social-link {
    width: 48px;
    height: 48px;
  }

  .footer-links {
    text-align: center;
  }

  .footer-links a {
    justify-content: center;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .prayer-times {
    padding: 18px;
  }

  .prayer-time-pill {
    justify-content: center;
  }

  .footer-bottom {
    text-align: center;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  #back-to-top i {
    font-size: 1.125rem;
  }
}

/* Smooth Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #back-to-top {
    transition: opacity 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  footer {
    background: white;
    color: black;
  }

  .social-link,
  #back-to-top {
    display: none;
  }
}
