/* ============================================
   DIZICLOCK PREMIUM FOOTER SYSTEM v2.0
   Advanced footer with animations and interactions
   ============================================ */

/* ============================================
   FOOTER CONTAINER & BACKGROUND
   ============================================ */
#premium-footer {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.95) 0%, 
    rgba(2, 6, 23, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  overflow: hidden;
}

#premium-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Glassmorphism background elements */
#premium-footer .absolute {
  pointer-events: none;
  z-index: 1;
}

#premium-footer .relative {
  position: relative;
  z-index: 10;
}

/* ============================================
   TRUST SIGNALS SECTION
   ============================================ */

[data-trust-item] {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-trust-item]:hover {
  transform: translateY(-4px);
}

[data-trust-item] .w-12.h-12 {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-trust-item] .w-12.h-12::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

[data-trust-item]:hover .w-12.h-12::before {
  left: 100%;
}

/* Trust signal animations */
@keyframes trustPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

[data-trust-item] .w-12.h-12 {
  animation: trustPulse 3s ease-in-out infinite;
}

[data-trust-item]:hover .w-12.h-12 {
  animation: none;
}

/* ============================================
   FOOTER BRAND SECTION
   ============================================ */

[data-footer-brand] {
  transition: all 0.3s ease;
}

[data-footer-brand]:hover {
  transform: translateX(4px);
}

[data-footer-brand] .bg-gradient-to-r {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Brand icon animation */
[data-footer-brand] .w-12.h-12 {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

[data-footer-brand] .w-12.h-12::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}

[data-footer-brand]:hover .w-12.h-12::after {
  width: 100%;
  height: 100%;
}

/* ============================================
   SOCIAL LINKS SECTION
   ============================================ */

[data-social-links] a {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

[data-social-links] a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

[data-social-links] a:hover::before {
  left: 100%;
}

[data-social-links] a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.4);
}

/* Social platform specific colors on hover */
[data-social-links] a[href*="twitter.com"]:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
  box-shadow: 0 8px 25px rgba(29, 161, 242, 0.4);
}

[data-social-links] a[href*="facebook.com"]:hover {
  background: #1877F2;
  border-color: #1877F2;
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

[data-social-links] a[href*="linkedin.com"]:hover {
  background: #0077B5;
  border-color: #0077B5;
  box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
}

[data-social-links] a[href*="github.com"]:hover {
  background: #333;
  border-color: #333;
  box-shadow: 0 8px 25px rgba(51, 51, 51, 0.4);
}

[data-social-links] a[href*="youtube.com"]:hover {
  background: #FF0000;
  border-color: #FF0000;
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

/* ============================================
   APP DOWNLOAD SECTION
   ============================================ */

[data-app-downloads] .group:hover > div {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(6, 182, 212, 0.4);
}

/* ============================================
   TOOL CATEGORIES SECTION
   ============================================ */

[data-tool-categories] .group {
  position: relative;
  transition: all 0.3s ease;
}

[data-tool-categories] .group::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  transition: width 0.3s ease;
  transform: translateY(-50%);
}

[data-tool-categories] .group:hover::before {
  width: 20px;
}

[data-tool-categories] .group:hover {
  padding-left: 32px;
}

[data-tool-categories] .text-xs {
  transition: all 0.3s ease;
  background: rgba(31, 41, 55, 0.5);
}

[data-tool-categories] .group:hover .text-xs {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
  transform: scale(1.1);
}

/* ============================================
   QUICK LINKS SECTION
   ============================================ */

[data-quick-links] .group {
  position: relative;
  transition: all 0.3s ease;
}

[data-quick-links] .group:hover {
  transform: translateX(4px);
}

[data-quick-links] .group i {
  transition: all 0.3s ease;
}

[data-quick-links] .group:hover i {
  transform: translateX(2px);
  color: #06b6d4 !important;
}

/* New badge animation */
[data-quick-links] .bg-gradient-to-r {
  animation: newBadge 2s ease-in-out infinite;
}

@keyframes newBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ============================================
   LEGAL LINKS SECTION
   ============================================ */

[data-legal-links] .group {
  position: relative;
  transition: all 0.3s ease;
}

[data-legal-links] .group:hover {
  transform: translateX(4px);
}

[data-legal-links] .group i {
  transition: all 0.3s ease;
}

[data-legal-links] .group:hover i {
  transform: translateX(2px);
  color: #06b6d4 !important;
}

/* ============================================
   NEWSLETTER FORM SECTION
   ============================================ */

[data-newsletter-form] input[type="email"] {
  transition: all 0.3s ease;
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-newsletter-form] input[type="email"]:focus {
  background: rgba(31, 41, 55, 0.8);
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

[data-newsletter-form] input[type="email"]:valid {
  border-color: #10b981;
}

[data-newsletter-form] input[type="email"]:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

[data-newsletter-form] button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-newsletter-form] button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

[data-newsletter-form] button[type="submit"]:hover::before {
  left: 100%;
}

[data-newsletter-form] button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

[data-newsletter-form] button[type="submit"]:active {
  transform: translateY(0);
}

/* Checkbox styling */
[data-newsletter-form] input[type="checkbox"] {
  transition: all 0.3s ease;
}

[data-newsletter-form] input[type="checkbox"]:checked {
  background-color: #06b6d4;
  border-color: #06b6d4;
}

/* Newsletter success/error states */
#newsletter-success, #newsletter-error {
  animation: slideInUp 0.4s ease-out;
}

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

/* Subscriber count animation */
[data-subscriber-count] {
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s ease;
}

[data-subscriber-count]:hover {
  transform: scale(1.05);
}

/* ============================================
   BOTTOM LINKS SECTION
   ============================================ */

[data-bottom-links] a {
  position: relative;
  transition: all 0.3s ease;
}

[data-bottom-links] a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  transition: width 0.3s ease;
}

[data-bottom-links] a:hover::after {
  width: 100%;
}

/* ============================================
   TECHNICAL INFO SECTION
   ============================================ */

#load-time {
  font-family: 'JetBrains Mono', monospace;
  color: #10b981;
  font-weight: 500;
}

#last-updated {
  font-family: 'JetBrains Mono', monospace;
  color: #f59e0b;
  font-weight: 500;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

.dark #premium-footer {
  background: linear-gradient(135deg, 
    rgba(2, 6, 23, 0.95) 0%, 
    rgba(0, 0, 0, 0.98) 100%);
}

.dark [data-newsletter-form] input[type="email"] {
  background: rgba(17, 24, 39, 0.7);
  border-color: rgba(55, 65, 81, 0.5);
  color: #e5e7eb;
}

.dark [data-newsletter-form] input[type="email"]:focus {
  background: rgba(17, 24, 39, 0.9);
  border-color: #06b6d4;
}

.dark [data-social-links] a {
  background: rgba(17, 24, 39, 0.5);
  border-color: rgba(55, 65, 81, 0.3);
}

.dark [data-social-links] a:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.5);
}

/* ============================================
   MOBILE RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  #premium-footer .grid-cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  #premium-footer .lg\:col-span-2 {
    grid-column: span 2;
  }
  
  #premium-footer .lg\:col-span-1 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  #premium-footer .grid-cols-6 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  #premium-footer .lg\:col-span-2,
  #premium-footer .lg\:col-span-1 {
    grid-column: span 1;
  }
  
  [data-trust-item] .w-12.h-12 {
    width: 3rem;
    height: 3rem;
  }
  
  [data-trust-item] .text-sm {
    font-size: 0.75rem;
  }
  
  [data-trust-item] .text-xs {
    font-size: 0.65rem;
  }
  
  [data-bottom-links] {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
  }
  
  [data-app-downloads] .flex {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  #premium-footer .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  [data-newsletter-form] .flex.space-x-2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  [data-newsletter-form] input[type="checkbox"] {
    margin-top: 0.25rem;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  [data-trust-item],
  [data-social-links] a,
  [data-tool-categories] .group,
  [data-quick-links] .group,
  [data-legal-links] .group,
  [data-newsletter-form] button[type="submit"] {
    transition: none !important;
    animation: none !important;
  }
  
  #premium-footer .bg-gradient-to-r {
    animation: none !important;
  }
  
  [data-trust-item] .w-12.h-12 {
    animation: none !important;
  }
  
  [data-social-links] a::before,
  [data-newsletter-form] button[type="submit"]::before {
    display: none !important;
  }
}

/* Focus styles for keyboard navigation */
#premium-footer a:focus,
#premium-footer button:focus,
#premium-footer input:focus {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

#premium-footer input[type="checkbox"]:focus {
  outline: 2px solid #06b6d4;
  outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #premium-footer {
    background: #000;
    color: #fff;
  }
  
  [data-newsletter-form] input[type="email"] {
    background: #000;
    border-color: #fff;
    color: #fff;
  }
  
  [data-social-links] a {
    background: #000;
    border: 2px solid #fff;
  }
  
  [data-tool-categories] .text-xs {
    background: #000;
    border: 1px solid #fff;
  }
}

/* ============================================
   CORE WEB VITALS OPTIMIZATION
   ============================================ */

/* Optimize animations for better performance */
[data-trust-item],
[data-social-links] a,
[data-tool-categories] .group,
[data-quick-links] .group,
[data-legal-links] .group,
[data-newsletter-form] button[type="submit"] {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Reduce paint areas */
#premium-footer * {
  box-sizing: border-box;
}

/* Optimize images and icons */
#premium-footer img,
#premium-footer svg,
#premium-footer i {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Critical CSS above the fold */
@media (min-width: 1025px) {
  #premium-footer .grid-cols-6 {
    display: grid;
  }
}

/* Lazy load non-critical styles */
@media (max-width: 1024px) {
  #premium-footer .lg\:col-span-2,
  #premium-footer .lg\:col-span-1 {
    grid-column: span 1;
  }
}

/* Optimize font loading */
#premium-footer {
  font-display: swap;
}

/* Reduce CLS with aspect ratios */
[data-trust-item] .w-12.h-12 {
  aspect-ratio: 1;
}

[data-social-links] a {
  aspect-ratio: 1;
}

/* Optimize for mobile performance */
@media (max-width: 768px) {
  #premium-footer .absolute {
    display: none;
  }
  
  [data-trust-item] .w-12.h-12 {
    animation: none;
  }
}