/* ========================================================================
   FOOTER PREMIUM - TESLA/APPLE STYLE 2025
   Minimal, elegant, professional
   ======================================================================== */

/* ====== CSS VARIABLES - LUXURY EDITION ====== */
:root {
  /* Dimensioni */
  --footer-padding-y: 56px;
  --footer-padding-y-mobile: 40px;
  --footer-max-width: 1440px;
  --footer-padding-x: 48px;
  --footer-padding-x-mobile: 20px;

  /* Colori - Luxury Dark */
  --footer-bg: #0a0a0a;
  --footer-text: rgba(255, 255, 255, 0.72);
  --footer-text-muted: rgba(255, 255, 255, 0.48);
  --footer-text-hover: rgba(255, 255, 255, 1);
  --footer-border: rgba(255, 255, 255, 0.06);
  --footer-accent: #c41e3a;
  --footer-accent-glow: rgba(196, 30, 58, 0.35);

  /* Tipografia - Luxury */
  --footer-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --footer-font-size: 14px;
  --footer-font-weight: 400;
  --footer-letter-spacing: 0.02em;
  --footer-line-height: 1.7;

  /* Transizioni - Luxury smooth */
  --footer-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== FOOTER BASE ====== */
.tf-footer {
  position: relative;
  z-index: 100;
  background: var(--footer-bg);
  padding: var(--footer-padding-y) 0;
  font-family: var(--footer-font);
  font-size: var(--footer-font-size);
  font-weight: var(--footer-font-weight);
  letter-spacing: var(--footer-letter-spacing);
  line-height: var(--footer-line-height);
  color: var(--footer-text);
  border-top: 1px solid var(--footer-border);
}

/* ====== CONTAINER ====== */
.tf-footer__container {
  max-width: var(--footer-max-width);
  margin: 0 auto;
  padding: 0 var(--footer-padding-x);
}

/* ====== MAIN GRID - Apple style (links centrati) ====== */
.tf-footer__main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--footer-border);
}

/* ====== LEFT SECTION - Logo & Social ====== */
.tf-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tf-footer__logo {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--footer-transition);
}

.tf-footer__logo:hover {
  opacity: 0.72;
}

.tf-footer__logo img {
  max-width: 140px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Logo shapes */
.tf-footer__logo img[data-shape="rounded"] {
  border-radius: 6px;
}

.tf-footer__logo img[data-shape="circle"] {
  border-radius: 50%;
}

/* Social Icons - Minimal */
.tf-footer__social {
  display: flex;
  gap: 16px;
}

.tf-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: transform var(--footer-transition), opacity var(--footer-transition);
}

.tf-footer__social a:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.tf-footer__social iconify-icon {
  font-size: 22px;
}

/* ====== CENTER SECTION - Navigation Links ====== */
.tf-footer__nav {
  display: flex;
  gap: 56px;
}

.tf-footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tf-footer__nav-title {
  color: var(--footer-text-hover);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
}

.tf-footer__nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tf-footer__nav-links a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color var(--footer-transition);
  white-space: nowrap;
  position: relative;
  display: inline-block;
}

/* Luxury underline reveal effect */
.tf-footer__nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--footer-accent);
  transition: width var(--footer-transition);
}

.tf-footer__nav-links a:hover {
  color: var(--footer-text-hover);
}

.tf-footer__nav-links a:hover::after {
  width: 100%;
}

/* ====== RIGHT SECTION - Contact ====== */
.tf-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
}

.tf-footer__contact-title {
  color: var(--footer-text-hover);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 0;
}

.tf-footer__contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--footer-text-muted);
}

.tf-footer__contact-info a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color var(--footer-transition);
}

.tf-footer__contact-info a:hover {
  color: var(--footer-text-hover);
}

.tf-footer__address {
  color: var(--footer-text-muted);
  font-size: 14px;
  max-width: 220px;
  margin-left: auto;
}

/* ====== BOTTOM BAR - Copyright ====== */
.tf-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 24px;
  gap: 12px;
}

.tf-footer__copyright {
  color: var(--footer-text-muted);
  font-size: 14px;
  margin: 0;
}

.tf-footer__legal {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.tf-footer__legal a {
  color: var(--footer-text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--footer-transition);
}

.tf-footer__legal a:hover {
  color: var(--footer-text-hover);
}

/* ====== BACK TO TOP ====== */
.tf-footer__back-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--footer-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--footer-transition);
  z-index: 999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tf-footer__back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tf-footer__back-to-top:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
}

.tf-footer__back-to-top iconify-icon {
  font-size: 20px;
}

/* ====== CUSTOM SERVICE FOOTER ====== */
.tf-footer__service {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-border);
  text-align: center;
  color: var(--footer-text-muted);
  font-size: 12px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .tf-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .tf-footer__brand {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tf-footer__contact {
    text-align: left;
  }

  .tf-footer__address {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --footer-padding-y: var(--footer-padding-y-mobile);
    --footer-padding-x: var(--footer-padding-x-mobile);
  }

  .tf-footer__main {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .tf-footer__brand {
    flex-direction: column;
    align-items: center;
  }

  .tf-footer__social {
    justify-content: center;
  }

  .tf-footer__nav {
    flex-direction: column;
    gap: 24px;
  }

  .tf-footer__nav-group {
    align-items: center;
  }

  .tf-footer__contact {
    text-align: center;
  }

  .tf-footer__address {
    margin: 0 auto;
    text-align: center;
  }

  .tf-footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .tf-footer__legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .tf-footer__back-to-top {
    bottom: 80px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .tf-footer__nav {
    gap: 20px;
  }

  .tf-footer__legal {
    gap: 12px;
  }

  .tf-footer__legal a {
    font-size: 13px;
  }
}

/* ====== ACCESSIBILITY ====== */
.tf-footer__back-to-top:focus-visible,
.tf-footer__social a:focus-visible,
.tf-footer__nav-links a:focus-visible,
.tf-footer__legal a:focus-visible {
  outline: 2px solid var(--footer-accent);
  outline-offset: 2px;
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  .tf-footer,
  .tf-footer * {
    transition: none !important;
  }
}

/* ====== PRINT ====== */
@media print {
  .tf-footer {
    background: white;
    color: black;
    border-top: 1px solid #ccc;
  }

  .tf-footer__back-to-top,
  .tf-footer__social {
    display: none;
  }
}

/* ====== HIDE OLD FOOTER STYLES ====== */
.CustombtFooter {
  display: none !important;
}

/* ====== FOOTER SUBMENU COLLAPSIBLE ====== */
.tf-footer__nav-links li.has-children {
  position: relative;
}

.tf-footer__link-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tf-footer__link-wrap a {
  flex: 1;
}

.tf-footer__toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--footer-text-muted);
  transition: all var(--footer-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.tf-footer__toggle:hover {
  color: var(--footer-text-hover);
  background: rgba(255, 255, 255, 0.05);
}

.tf-footer__toggle iconify-icon {
  font-size: 18px;
  transition: transform var(--footer-transition);
}

.tf-footer__toggle[aria-expanded="true"] iconify-icon {
  transform: rotate(180deg);
}

.tf-footer__submenu {
  display: none;
  list-style: none;
  padding: 8px 0 8px 16px;
  margin: 0;
  border-left: 2px solid var(--footer-border);
  margin-left: 8px;
  margin-top: 8px;
}

.tf-footer__submenu.is-open {
  display: block;
  animation: footerSubmenuFadeIn 0.3s ease;
}

@keyframes footerSubmenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tf-footer__submenu li {
  margin-bottom: 6px;
}

.tf-footer__submenu li:last-child {
  margin-bottom: 0;
}

.tf-footer__submenu a {
  font-size: 13px;
  color: var(--footer-text-muted) !important;
  transition: all var(--footer-transition);
  display: block;
  padding: 4px 0;
}

.tf-footer__submenu a:hover {
  color: var(--footer-accent) !important;
  padding-left: 4px;
}

/* Mobile - Submenu sempre visibili come lista espansa */
@media (max-width: 767px) {
  .tf-footer__nav-group--quicklinks .tf-footer__nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .tf-footer__nav-group--quicklinks .tf-footer__nav-links > li {
    border-bottom: 1px solid var(--footer-border);
    padding: 12px 0;
  }

  .tf-footer__nav-group--quicklinks .tf-footer__nav-links > li:last-child {
    border-bottom: none;
  }

  .tf-footer__link-wrap {
    padding-right: 0;
  }

  .tf-footer__toggle {
    padding: 8px;
  }
}

/* ====== END FOOTER PREMIUM - TESLA/APPLE STYLE ====== */
