/* Layout styles - header, footer, grid structures */

:root {
  --header-offset: 80px;
}

/* Header */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

header.nav-hidden {
  transform: translateY(-100%);
}

header .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 15px; /* Reduced padding */
}

.logo-container {
  flex-shrink: 0;
  flex: 0 0 auto;
}

.logo-container img {
  height: 80px; /* Reduced from 120px */
  width: auto;
  object-fit: contain;
  max-width: none;
  transition: height 0.3s ease;
}

header.sticky .logo-container img {
  height: 60px; /* Even smaller when sticky/scrolled if needed */
}

nav ul {
  display: flex;
  list-style: none;
  flex-wrap: nowrap;
  align-items: center;
}

nav ul li {
  margin-left: 15px;
  flex-shrink: 0;
}

/* Avvicina il menu al logo senza alterare dimensioni */
nav {
  margin-left: 22px;
}

/* Il primo elemento (Home) non ha margine a sinistra */
nav ul li:first-child {
  margin-left: 0;
}

nav ul li a {
  color: var(--dark-color);
  font-weight: 600;
  padding: 10px 0;
  position: relative;
  white-space: nowrap;
}

nav ul li a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
  width: 100%;
}

nav ul li a img {
  height: 20px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  max-width: none;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo img {
  height: 160px;
  margin-bottom: 15px;
  background-color: white;
  padding: 10px;
  border-radius: 8px;
}

.footer-logo p {
  font-size: 1.1rem;
  color: #f0f0f0;
  font-style: italic;
  margin-top: 5px;
}

.footer-links h4,
.footer-newsletter h4 {
  color: white;
  margin-bottom: 20px;
  position: relative;
  font-size: 1.2rem;
}

.footer-links h4:after,
.footer-newsletter h4:after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  position: absolute;
  bottom: -10px;
  left: 0;
}

.footer-links ul {
  list-style: none;
}

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

.footer-links ul li a {
  color: #ccc;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin-bottom: 0;
  color: #ccc;
}

.footer-bottom-links a {
  color: #ccc;
  margin-left: 20px;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: white;
}
