/* Prevenire layout shifts durante il caricamento dei font */
html {
  font-display: swap;
}

body {
  font-family: "Poppins";
  font-display: swap;
}

/* Loader styles - CSS statico per evitare hydration mismatch */
#main-content {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

#main-content.loaded {
  opacity: 1;
}

#initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.3s ease-out;
  contain: layout style paint;
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
}

#initial-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.logo {
  width: 120px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg width='1649' height='191' viewBox='0 0 1649 191' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M583.742 0C601.256 0 617.283 4.11583 631.82 12.3477C646.357 20.4044 657.83 31.702 666.237 46.2393C674.819 60.7764 679.11 77.153 679.11 95.3682C679.11 113.583 674.819 129.96 666.237 144.497C657.83 159.034 646.269 170.418 631.557 178.65C617.02 186.882 601.081 190.998 583.742 190.998C566.227 190.998 550.113 186.882 535.401 178.65C520.864 170.419 509.304 159.034 500.722 144.497C492.14 129.96 487.849 113.583 487.849 95.3682C487.849 77.1529 492.14 60.7764 500.722 46.2393C509.304 31.7021 520.864 20.4044 535.401 12.3477C550.113 4.11579 566.227 5.9547e-05 583.742 0ZM1553.3 0C1570.81 4.11646e-05 1586.84 4.11577 1601.37 12.3477C1615.91 20.4044 1627.38 31.7021 1635.79 46.2393C1644.37 60.7765 1648.66 77.1529 1648.66 95.3682C1648.66 113.583 1644.37 129.96 1635.79 144.497C1627.38 159.034 1615.82 170.419 1601.11 178.65C1586.57 186.882 1570.64 190.998 1553.3 190.998C1535.78 190.998 1519.67 186.882 1504.96 178.65C1490.42 170.418 1478.86 159.034 1470.28 144.497C1461.69 129.96 1457.4 113.583 1457.4 95.3682C1457.4 77.153 1461.69 60.7764 1470.28 46.2393C1478.86 31.702 1490.42 20.4044 1504.96 12.3477C1519.67 4.11578 1535.78 0 1553.3 0ZM123.357 3.9873C154.784 5.97833 167.933 46.0451 142.98 65.8604L98.5415 96.8057L142.574 127.474C168.173 147.293 154.987 188.392 122.222 189.743H34.0024C0.927389 188.469 -12.2234 147.118 13.7016 127.298L57.5717 96.751C57.2703 96.6718 56.9899 96.4541 56.7387 96.2754C43.5008 86.9379 29.9834 77.9672 16.8002 68.5596C15.5034 67.6344 14.1471 66.7431 12.9028 65.75C-11.9175 45.9099 1.45526 5.71583 32.8637 3.98047L123.357 3.9873ZM355.655 114.81L395.588 3.15234H466.786V189.159H408.724V96.4189L380.088 189.159H330.171L301.535 96.4189V189.159H243.21V3.15234H314.67L355.655 114.81ZM812.595 114.81L852.529 3.15234H923.726V189.159H865.664V96.4189L837.028 189.159H787.111L758.474 96.4189V189.159H700.15V3.15234H771.61L812.595 114.81ZM1074.05 49.6543H1008.37V72.5107H1066.17V116.386H1008.37V142.657H1074.05V189.159H950.043V3.15234H1074.05V49.6543ZM1216.09 98.2578V3.15234H1274.42V189.159H1216.09L1154.35 95.6309V189.159H1096.03V3.15234H1154.35L1216.09 98.2578ZM1446.84 49.3916H1397.45V189.159H1339.12V49.3916H1290.26V3.15234H1446.84V49.3916ZM583.742 53.8574C572.007 53.8575 562.987 57.624 556.682 65.1553C550.377 72.5115 547.224 82.5824 547.224 95.3682C547.224 107.979 550.377 118.05 556.682 125.581C562.987 132.937 572.007 136.615 583.742 136.615C595.301 136.615 604.234 132.937 610.539 125.581C616.845 118.05 619.997 107.979 619.997 95.3682C619.997 82.5825 616.845 72.5115 610.539 65.1553C604.234 57.6239 595.301 53.8574 583.742 53.8574ZM1553.3 53.8574C1541.56 53.8574 1532.54 57.6239 1526.24 65.1553C1519.93 72.5114 1516.78 82.5826 1516.78 95.3682C1516.78 107.979 1519.93 118.05 1526.24 125.581C1532.54 132.937 1541.56 136.615 1553.3 136.615C1564.86 136.615 1573.79 132.937 1580.09 125.581C1586.4 118.05 1589.55 107.979 1589.55 95.3682C1589.55 82.5827 1586.4 72.5114 1580.09 65.1553C1573.79 57.624 1564.86 53.8575 1553.3 53.8574Z' fill='%23000'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px;
  flex-shrink: 0;
  min-width: 120px;
  min-height: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f0f0f0;
  border-top: 2px solid #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}

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