/* Modern Footer with Bento UI & Glassmorphism */
.site-footer {
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.98) 0%, 
    rgba(30, 41, 59, 0.98) 50%, 
    rgba(51, 65, 85, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  font-family: var(--font-sans);
}

/* Glassmorphism overlay */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(91, 67, 234, 0.03) 0%, 
    rgba(147, 51, 234, 0.03) 50%, 
    rgba(236, 72, 153, 0.03) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Subtle animated snowy particle pattern */
.site-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.32; /* slightly more visible */
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22) 1.8px, transparent 3.2px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18) 1.6px, transparent 3px),
    radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.14) 1.4px, transparent 2.6px);
  background-size:
    180px 180px,
    260px 260px,
    340px 340px;
  background-position:
    0px 0px,
    80px 40px,
    160px 120px;
  background-repeat: repeat;
  animation: footerSnowfall 48s linear infinite;
  will-change: background-position;
}

@keyframes footerSnowfall {
  0% {
    background-position:
      0px 0px,
      80px 40px,
      160px 120px;
  }
  100% {
    /* natural downward drift with slight horizontal parallax */
    background-position:
      -40px 420px,
      20px 560px,
      -60px 720px;
  }
}

.footer-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Bento Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.1fr 1.05fr;
  gap: 24px;
  padding: 60px 0 40px;
  align-items: stretch;
}

/* Bento Cards */
.footer-bento-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 280px;
  height: 100%;
}

.footer-bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(91, 67, 234, 0.05) 0%, 
    rgba(147, 51, 234, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 20px;
}

.footer-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 67, 234, 0.2);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(91, 67, 234, 0.1);
}

.footer-bento-card:hover::before {
  opacity: 1;
}

/* Brand Section */
.brand-section {
  grid-column: 1;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  /* Subtle neon purple ring and glow */
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(91, 67, 234, 0.22),
    0 0 24px rgba(91, 67, 234, 0.14);
}

.brand-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(91, 67, 234, 0.15);
  padding: 8px;
  transition: transform 0.3s ease;
  object-fit: contain;
}

.brand-logo:hover .footer-logo {
  transform: scale(1.05);
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-description {
  color: rgba(226, 232, 240, 0.85);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: justify;
  display: block;
  overflow: visible;
}

.brand-stats {
  display: flex;
  gap: 32px;
  justify-content: flex-start;
}

.brand-cert-logos {
  margin-top: 16px;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}

.stat-item {
  text-align: center;
  min-width: 80px;
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #5b43ea;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(91, 67, 234, 0.3);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.7);
  font-weight: 500;
  line-height: 1.3;
}

/* Footer Titles */
.footer-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 24px 0;
  position: relative;
  z-index: 2;
  line-height: 1.3;
  padding-bottom: 8px;
}

/* Modern underline accent for section titles */
.footer-title::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  height: 3px;
  width: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(91, 67, 234, 0.0), rgba(91, 67, 234, 0.75), rgba(147, 51, 234, 0.0));
  box-shadow: 0 0 12px rgba(91, 67, 234, 0.35);
}

/* Slight title letter-spacing and weight refinement */
.footer-title {
  letter-spacing: 0.1px;
  font-weight: 800;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

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

.footer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 44px;
}

.footer-link:hover {
  color: #ffffff;
  background: rgba(91, 67, 234, 0.15);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(91, 67, 234, 0.2);
}

.link-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.footer-link:hover .link-icon {
  transform: scale(1.1);
}

/* Newsletter Section */
.newsletter-description {
  color: rgba(226, 232, 240, 0.7);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.newsletter-form {
  position: relative;
  z-index: 2;
}

.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}

.newsletter-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  height: 48px;
  box-sizing: border-box;
}

.newsletter-input::placeholder {
  color: rgba(226, 232, 240, 0.5);
}

.newsletter-input:focus {
  outline: none;
  border-color: rgba(91, 67, 234, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(91, 67, 234, 0.1);
}

.newsletter-btn {
  background: linear-gradient(135deg, #5b43ea 0%, #7c3aed 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  height: 48px;
  min-width: 48px;
  box-sizing: border-box;
}

.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 67, 234, 0.3);
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Social Links */
.social-links {
  position: relative;
  z-index: 2;
}

.social-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.social-icons {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
  background: rgba(91, 67, 234, 0.1);
  border-color: rgba(91, 67, 234, 0.3);
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(91, 67, 234, 0.2);
}

.social-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-link:hover .social-icon {
  transform: scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  position: relative;
  z-index: 2;
}

.footer-bottom-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 8px;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legal-link {
  color: rgba(226, 232, 240, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: #ffffff;
}

.separator {
  color: rgba(226, 232, 240, 0.4);
  font-size: 12px;
}

.footer-copyright p {
  color: rgba(226, 232, 240, 0.6);
  font-size: 14px;
  margin: 0;
}

/* Desktop layout breathing room */
@media (min-width: 1025px) {
  .footer-container {
    /* Allow wider but bounded container on large screens */
    max-width: clamp(1200px, 92vw, 1400px);
  }

  .footer-grid {
    /* Ensure humane min widths while keeping proportional growth */
    grid-template-columns:
      minmax(260px, 1.4fr)
      minmax(220px, 1fr)
      minmax(260px, 1.2fr)
      minmax(240px, 1.15fr);
    gap: clamp(24px, 2.4vw, 36px);
  }

  .footer-bento-card {
    /* Slightly larger padding on spacious viewports */
    padding: clamp(24px, 2.2vw, 32px);
  }

  /* Subtle size emphasis for brand column only */
  .brand-section {
    padding: clamp(26px, 2.5vw, 36px);
  }
  .brand-section .brand-logo { gap: 14px; }
  .brand-section .footer-logo { width: 56px; height: 56px; }
  .brand-section .brand-title { font-size: 28px; }
  .brand-section .brand-description { font-size: 15.5px; }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 40px 0 30px;
  }
  
  .brand-section {
    grid-column: 1 / -1;
  }
  
  .footer-bento-card {
    min-height: auto;
    padding: 28px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 0 16px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 30px 0 20px;
  }
  
  .footer-bento-card {
    padding: 24px;
    min-height: auto;
  }
  
  .brand-stats {
    gap: 16px;
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .footer-legal {
    justify-content: center;
  }
  
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-bento-card {
    padding: 20px;
  }
  
  .brand-title {
    font-size: 20px;
  }
  
  .footer-title {
    font-size: 16px;
  }
  
  .social-icons {
    gap: 12px;
    justify-content: center;
  }
  
  .social-link {
    width: 44px;
    height: 44px;
  }
  
  .social-icon {
    width: 20px;
    height: 20px;
  }
  
  .brand-stats {
    gap: 20px;
    justify-content: center;
  }
  
  .stat-item {
    min-width: 70px;
  }
}

/* Animation Classes */
.footer-visible {
  animation: footerSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Stagger animation for cards */
.footer-bento-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure cards are visible when animations are disabled */
@media (prefers-reduced-motion: reduce) {
  .footer-bento-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Focus styles for accessibility */
.footer-link:focus,
.social-link:focus,
.newsletter-input:focus,
.newsletter-btn:focus {
  outline: 2px solid rgba(91, 67, 234, 0.5);
  outline-offset: 2px;
}

/* Additional improvements */
.footer-bento-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.footer-bento-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Persistent subtle neon ring for brand card (not only on hover) */
.footer-bento-card.brand-section {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(91, 67, 234, 0.22),
    0 0 24px rgba(91, 67, 234, 0.14);
}

/* Slightly stronger neon on hover for brand only */
.brand-section:hover {
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(91, 67, 234, 0.28),
    0 0 32px rgba(91, 67, 234, 0.18);
}

/* Better text contrast */
.footer-copyright p {
  color: rgba(226, 232, 240, 0.8);
  font-weight: 500;
}

.legal-link {
  color: rgba(226, 232, 240, 0.85);
  font-weight: 500;
}

.footer-legal .legal-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
}

.footer-legal .legal-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.legal-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Improved newsletter section */
.newsletter-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.social-links {
  margin-top: auto;
}

/* Contact / Namad */
.contact-section .footer-title { margin-bottom: 12px; }
.contact-section .contact-block { margin-bottom: 8px; }
/* Subtle purple-tinted background for contact column */
.contact-section {
  background: linear-gradient(135deg,
    rgba(91, 67, 234, 0.065) 0%,
    rgba(147, 51, 234, 0.055) 100%);
  border-color: rgba(91, 67, 234, 0.16);
}
/* Smaller items only inside contact column */
.contact-section .footer-links li { margin-bottom: 10px; }
.contact-section .footer-link {
  gap: 10px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 13px;
}
.contact-section .link-icon { width: 16px; height: 16px; }
.contact-section .label-instant,
.contact-section .label-routine {
  padding: 3px 8px;
  font-size: 11px;
  margin-right: 6px;
}
.contact-section .label-icon { width: 12px; height: 12px; }
/* Minimal separator between contact items */
.contact-section .contact-separator { list-style: none; padding: 0; margin: 6px 0; }
.contact-section .contact-separator-line {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to left, rgba(255,255,255,0.08), rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  border-radius: 999px;
}

.cert-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cert-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(91, 67, 234, 0.16);
}

@media (max-width: 768px) {
  .brand-cert-logos { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 480px) {
  .cert-logo {
    max-height: 64px;
  }
}

/* Additional spacing improvements */
.footer-title {
  margin-bottom: 20px;
}

.footer-links li:last-child {
  margin-bottom: 0;
}

/* Better hover states */
.footer-link:hover .link-icon {
  transform: scale(1.1) translateX(-2px);
}

.social-link:hover .social-icon {
  transform: scale(1.15);
}

/* Minimal golden label for instant support */
.label-instant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.label-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Blue minimal label for ticket routine */
.label-routine {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: #0b1020;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .footer-bento-card,
  .footer-link,
  .social-link,
  .newsletter-btn {
    transition: none;
    animation: none;
  }
  
  .footer-bento-card {
    opacity: 1;
    transform: none;
  }

  /* Disable snowfall animation for reduced motion */
  .site-footer::after {
    animation: none;
    opacity: 0.15;
  }
}
