/* ============================================
   FOOTER - CSS
   Tema: Celestiale / Astronomico
   Complementare a calendario-lunare-style.css
   ============================================ */

/* ============================================
   1. PULSANTE INDIETRO
   ============================================ */
.btn.float-end {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-moon-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn.float-end:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-aurora-cyan);
  transform: translateX(-5px);
  box-shadow: var(--shadow-glow);
}

.btn.float-end i {
  transition: transform var(--transition-base);
}

.btn.float-end:hover i {
  transform: translateX(-3px);
}

puls {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ============================================
   2. TAG CONTAINER
   ============================================ */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-moon-glow);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: '#';
  margin-right: 2px;
  color: var(--color-aurora-purple);
  font-weight: 600;
}

.tag:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--color-aurora-purple);
  color: var(--color-moon-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
}

/* Tag con animazione casuale al caricamento */
.tag:nth-child(odd) {
  animation: tagFloat 4s ease-in-out infinite;
}

.tag:nth-child(even) {
  animation: tagFloat 4s ease-in-out infinite reverse;
  animation-delay: 0.5s;
}

@keyframes tagFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.tag:hover {
  animation: none;
  transform: translateY(-2px) scale(1.05);
}

/* ============================================
   3. BARRA SOCIAL / BRAND
   ============================================ */
.container > .row[style*="linear-gradient"] {
  background: var(--gradient-aurora) !important;
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0 !important;
  padding: var(--space-lg) !important;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(168, 85, 247, 0.3);
  position: relative;
  overflow: hidden;
}

.container > .row[style*="linear-gradient"]::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Brand OTS WEB */
.navbar-brand[style*="uppercase"] {
  font-family: var(--font-display) !important;
  font-size: 1.75rem !important;
  letter-spacing: 0.1em !important;
  position: relative;
  z-index: 1;
}

/* ============================================
   4. SOCIAL ICONS
   ============================================ */
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.5rem !important;
  color: white !important;
  text-decoration: none !important;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.social a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.social a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social a:hover::before {
  opacity: 0.2;
}

/* Colori specifici per social */
.social a[title="facebook"]:hover {
  background: #1877f2;
}

.social a[title="twitter"]:hover {
  background: #1da1f2;
}

.social a[title="linkedin"]:hover {
  background: #0a66c2;
}

.social a[title="youtube"]:hover {
  background: #ff0000;
}

.social a[title="instagram"]:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social a[title="pinterest"]:hover {
  background: #e60023;
}

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

/* ============================================
   5. METODI DI PAGAMENTO
   ============================================ */
.pagamenti {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-size: 2rem !important;
  color: white;
  position: relative;
  z-index: 1;
}

.pagamenti i {
  transition: all var(--transition-base);
  opacity: 0.9;
}

.pagamenti i:hover {
  transform: scale(1.2);
  opacity: 1;
}

/* ============================================
   6. FOOTER PRINCIPALE
   ============================================ */
footer {
  background: var(--color-space-black);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Effetto stelle nel footer */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.5), transparent);
  opacity: 0.3;
  pointer-events: none;
}

footer > .container {
  position: relative;
  z-index: 1;
}

footer .row {
  padding: var(--space-2xl) var(--space-lg) !important;
  color: var(--color-moon-glow) !important;
  background: transparent !important;
  text-align: left !important;
}

/* ============================================
   7. COLONNE FOOTER
   ============================================ */
footer .col-sm-4 {
  padding: var(--space-lg) !important;
  margin: 0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  position: relative;
}

/* Rimuovi bordi e usa separatori moderni */
footer .col-sm-4[style*="border-right"],
footer .col-sm-4[style*="border-left"] {
  border: none !important;
}

footer .col-sm-4:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
}

/* Titoli sezioni footer */
footer p[style*="font-weight: 600"] {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  color: var(--color-aurora-cyan) !important;
  margin-bottom: var(--space-md) !important;
  position: relative;
  padding-bottom: var(--space-sm);
}

footer p[style*="font-weight: 600"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient-aurora);
  border-radius: var(--radius-full);
}

/* Testo footer */
footer p {
  color: rgba(240, 240, 245, 0.7) !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  margin-bottom: var(--space-sm) !important;
}

footer a {
  color: var(--color-aurora-purple) !important;
  transition: all var(--transition-base);
  text-decoration: none !important;
}

footer a:hover {
  color: var(--color-aurora-cyan) !important;
  text-shadow: 0 0 10px var(--color-aurora-cyan);
}

/* Copyright */
footer .text-center {
  text-align: center !important;
  color: rgba(240, 240, 245, 0.5) !important;
  font-size: 0.85rem !important;
  margin-top: var(--space-md) !important;
}

/* ============================================
   8. COOKIE BANNER
   ============================================ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 26, 0.98);
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  padding: var(--space-lg) var(--space-xl);
  display: none;
  z-index: 10000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: cookieSlideUp 0.5s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes cookieSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-banner p {
  color: var(--color-moon-glow);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  max-width: 800px;
}

#cookie-banner #cookie-accept {
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: var(--gradient-aurora);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-right: var(--space-md);
}

#cookie-banner #cookie-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

#cookie-banner #cookie-info {
  color: var(--color-aurora-cyan);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-base);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: var(--radius-md);
}

#cookie-banner #cookie-info:hover {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--color-aurora-cyan);
}

/* ============================================
   9. RESPONSIVE FOOTER
   ============================================ */
@media (max-width: 991px) {
  footer .col-sm-4::after {
    display: none;
  }
  
  footer .col-sm-4 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: var(--space-lg) !important;
    padding-bottom: var(--space-lg) !important;
  }
  
  footer .col-sm-4:last-child {
    border-bottom: none !important;
  }
  
  .social {
    flex-wrap: wrap;
  }
  
  .pagamenti {
    flex-wrap: wrap;
    font-size: 1.5rem !important;
  }
  
  .container > .row[style*="linear-gradient"] {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center !important;
  }
  
  .container > .row[style*="linear-gradient"] .col-sm-4 {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .tag-container {
    padding: var(--space-md);
    gap: var(--space-xs);
  }
  
  .tag {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
  }
  
  #cookie-banner {
    padding: var(--space-md);
    text-align: center;
  }
  
  #cookie-banner #cookie-accept,
  #cookie-banner #cookie-info {
    display: block;
    width: 100%;
    margin: var(--space-sm) 0;
    text-align: center;
  }
  
  .social a {
    width: 38px;
    height: 38px;
    font-size: 1.2rem !important;
  }
  
  footer .row {
    padding: var(--space-lg) var(--space-md) !important;
  }
  
  .navbar-brand[style*="uppercase"] {
    font-size: 1.25rem !important;
  }
}

/* ============================================
   10. ANIMAZIONI FOOTER
   ============================================ */
/* Animazione ingresso elementi footer */
footer .col-sm-4 {
  animation: fadeInUp 0.6s ease backwards;
}

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

/* Social icons stagger animation */
.social a {
  animation: popIn 0.4s ease backwards;
}

.social a:nth-child(1) { animation-delay: 0.1s; }
.social a:nth-child(2) { animation-delay: 0.15s; }
.social a:nth-child(3) { animation-delay: 0.2s; }
.social a:nth-child(4) { animation-delay: 0.25s; }
.social a:nth-child(5) { animation-delay: 0.3s; }
.social a:nth-child(6) { animation-delay: 0.35s; }

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Payment icons animation */
.pagamenti i {
  animation: slideInRight 0.5s ease backwards;
}

.pagamenti i:nth-child(1) { animation-delay: 0.2s; }
.pagamenti i:nth-child(2) { animation-delay: 0.25s; }
.pagamenti i:nth-child(3) { animation-delay: 0.3s; }
.pagamenti i:nth-child(4) { animation-delay: 0.35s; }

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

/* ============================================
   11. HOVER EFFECTS AVANZATI
   ============================================ */
/* Effetto ripple sui tag */
.tag {
  position: relative;
  overflow: hidden;
}

.tag::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.tag:active::after {
  width: 200px;
  height: 200px;
}

/* Glow effect su link footer */
footer a {
  position: relative;
}

footer a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-aurora);
  transition: width var(--transition-base);
}

footer a:hover::before {
  width: 100%;
}

/* ============================================
   12. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .tag,
  footer .col-sm-4,
  .social a,
  .pagamenti i {
    animation: none;
  }
  
  #cookie-banner {
    animation: none;
  }
  
  .container > .row[style*="linear-gradient"]::before {
    animation: none;
  }
}

/* Focus states */
.tag:focus-visible,
.social a:focus-visible,
#cookie-banner #cookie-accept:focus-visible,
#cookie-banner #cookie-info:focus-visible,
footer a:focus-visible {
  outline: 2px solid var(--color-aurora-cyan);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .tag {
    border-color: white;
  }
  
  footer p {
    color: white !important;
  }
  
  #cookie-banner {
    border-top-color: white;
  }
}

/* ============================================
   13. PRINT STYLES
   ============================================ */
@media print {
  .tag-container,
  .social,
  .pagamenti,
  #cookie-banner,
  .btn.float-end {
    display: none !important;
  }
  
  footer {
    background: white !important;
    color: black !important;
  }
  
  footer::before {
    display: none;
  }
  
  footer p,
  footer a {
    color: black !important;
  }
}