.newsletter-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================
   FORM HOMEPAGE
   ============================================ */
.newsletter-form .input-wrapper {
  width: calc(100% - 250px);
  margin-right: 30px;
}

.newsletter-form .input-wrapper input {
  width: 100%;
  height: 80px;
  background: #fff;
  border: none;
  padding: 0 25px;
  font-size: 16px;
  outline: none;
}

.newsletter-form .input-wrapper input::placeholder {
  color: #999;
}

.newsletter-form .search-btn {
  background: var(--prime-six);
  width: 250px;
  height: 80px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.newsletter-form .search-btn:hover {
  background: #ffffff;
  color: #0C252B !important;
}

.newsletter-form button[disabled] {
  cursor: wait;
  opacity: .75;
}

.newsletter-privacy-wrapper {
  margin-top: 12px;
  text-align: center;
}

/* ============================================
   FORM FOOTER
   ============================================ */
.footer-style-seven .giaffatto-footer-main {
  background: #f0f9f1 !important;
  border-radius: 0 !important;
  padding: 350px 0 176px !important;
  margin: 0;
}

.footer-style-seven .giaffatto-footer-main::before {
  display: none !important;
}

.footer-style-seven .giaffatto-footer-main > .container {
  width: 100%;
  max-width: 1510px;
  padding-left: 15px;
  padding-right: 15px;
}

.giaffatto-footer-grid {
  display: grid;
  grid-template-columns: 180px 210px 270px 155px minmax(430px, 1fr);
  column-gap: 50px;
  align-items: start;
  width: 100%;
}

.giaffatto-footer-column {
  min-width: 0;
}

.giaffatto-footer-heading {
	margin: 0 0 28px;
	padding: 0;
	color: #8d918f;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.8px;
  text-transform: uppercase;
}

.giaffatto-footer-links {
  margin: 0;
  padding: 0;
}

.giaffatto-footer-links li {
  margin: 0 0 21px;
  padding: 0;
}

.giaffatto-footer-links li:last-child {
  margin-bottom: 0;
}

.giaffatto-footer-links a {
	display: inline-block;
	color: #111111;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.giaffatto-footer-links a:hover,
.giaffatto-footer-links a:focus {
  color: var(--prime-six, #1d9b3b);
}

.giaffatto-footer-newsletter {
  width: 100%;
  min-width: 0;
}

.giaffatto-footer-newsletter-title {
	margin: -1px 0 8px;
	color: #080808;
	font-size: 21px;
	font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.giaffatto-footer-newsletter-description {
	margin: 0 0 28px;
	color: #898d8a;
	font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.giaffatto-footer-newsletter-form {
  position: relative;
  width: 100%;
  max-width: 510px;
  margin: 0;
  padding: 0;
}

.giaffatto-footer-newsletter-field {
  position: relative;
  margin: 0;
}

.giaffatto-footer-newsletter-input-group {
  display: flex;
  width: 100%;
  height: 69px;
  margin: 0;
  background: #ffffff;
  border: 1px solid #eceeec;
  overflow: hidden;
}

.giaffatto-footer-newsletter-input-group input[type="email"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 27px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: #ffffff;
  color: #151515;
  font-family: inherit;
	font-size: 16px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.giaffatto-footer-newsletter-input-group input[type="email"]::placeholder {
  color: #333333;
  opacity: 1;
}

.giaffatto-footer-newsletter-input-group input[type="email"]:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.giaffatto-footer-newsletter-input-group button {
  flex: 0 0 145px;
  width: 145px;
  height: 100%;
  margin: 0 !important;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: #050505;
  color: #ffffff;
  font-family: inherit;
	font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.giaffatto-footer-newsletter-input-group button:hover,
.giaffatto-footer-newsletter-input-group button:focus {
  background: #1d1d1d;
  color: #ffffff;
}

.giaffatto-footer-newsletter-privacy {
  margin-top: 12px;
}

.giaffatto-footer-newsletter-privacy label {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
  color: #262626;
	font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.giaffatto-footer-newsletter-privacy input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.giaffatto-footer-checkbox {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 1px solid #d8ddd9;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.giaffatto-footer-newsletter-privacy input[type="checkbox"]:checked + .giaffatto-footer-checkbox {
  background: #111111;
  border-color: #111111;
}

.giaffatto-footer-newsletter-privacy input[type="checkbox"]:checked + .giaffatto-footer-checkbox::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.giaffatto-footer-newsletter-privacy input[type="checkbox"]:focus-visible + .giaffatto-footer-checkbox {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.giaffatto-footer-privacy-text {
  display: inline;
}

.giaffatto-footer-privacy-text a {
  color: #262626;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.giaffatto-footer-privacy-text a:hover,
.giaffatto-footer-privacy-text a:focus {
  color: #111111;
}

.giaffatto-footer-newsletter .newsletter-field-error {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.3;
}

.giaffatto-footer-newsletter .newsletter-hp {
  position: absolute !important;
  left: -99999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 1599px) {
  .footer-style-seven .giaffatto-footer-main > .container {
    max-width: 1370px;
  }

  .giaffatto-footer-grid {
    grid-template-columns: 155px 175px 235px 145px minmax(390px, 1fr);
    column-gap: 38px;
  }

	.giaffatto-footer-links a {
		font-size: 16px;
	}

	.giaffatto-footer-newsletter-title {
		font-size: 20px;
	}
}

@media (max-width: 1399.98px) {
  .footer-style-seven .giaffatto-footer-main {
    padding-top: 290px !important;
    padding-bottom: 130px !important;
  }

  .giaffatto-footer-grid {
    grid-template-columns: 1fr 1fr 1.35fr 1fr 2.1fr;
    column-gap: 30px;
  }

	.giaffatto-footer-heading {
		font-size: 13px;
	}

	.giaffatto-footer-links a {
		font-size: 16px;
	}

  .giaffatto-footer-newsletter-description br {
    display: none !important;
  }
}

@media (max-width: 1199.98px) {
  .footer-style-seven .giaffatto-footer-main {
    padding: 290px 0 100px !important;
  }

  .giaffatto-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 35px;
    row-gap: 65px;
  }

  .giaffatto-footer-newsletter {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 650px;
  }

  .giaffatto-footer-newsletter-form {
    max-width: 600px;
  }
}

@media (max-width: 767.98px) {
  .footer-style-seven .giaffatto-footer-main {
    padding: 260px 0 70px !important;
  }

  .giaffatto-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 50px;
  }

  .giaffatto-footer-heading {
    margin-bottom: 22px;
  }

  .giaffatto-footer-links li {
    margin-bottom: 16px;
  }

  .giaffatto-footer-newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .footer-style-seven .giaffatto-footer-main {
    padding: 260px 0 55px !important;
  }

  .footer-style-seven .giaffatto-footer-main > .container {
    padding-left: 25px;
    padding-right: 25px;
  }

  .giaffatto-footer-grid {
    grid-template-columns: 1fr;
    row-gap: 42px;
  }

  .giaffatto-footer-newsletter {
    grid-column: auto;
  }

  .giaffatto-footer-heading {
    font-size: 15px;
    margin-bottom: 20px;
  }

	.giaffatto-footer-links a {
		font-size: 16px;
	}

	.giaffatto-footer-newsletter-title {
		font-size: 20px;
	}

	.giaffatto-footer-newsletter-description {
		font-size: 14px;
  }

  .giaffatto-footer-newsletter-input-group {
    height: 62px;
  }

  .giaffatto-footer-newsletter-input-group input[type="email"] {
    padding: 0 18px;
		font-size: 15px;
  }

  .giaffatto-footer-newsletter-input-group button {
    flex-basis: 118px;
    width: 118px;
    padding-left: 12px;
    padding-right: 12px;
		font-size: 15px;
  }

  .giaffatto-footer-newsletter-privacy label {
    align-items: flex-start;
    font-size: 14px;
  }

  .giaffatto-footer-checkbox {
    margin-top: 1px;
  }
}

.footer-newsletter {
  max-width: 100%;
}

.footer-newsletter__header {
  margin-bottom: 20px;
}

.footer-newsletter__title {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin-top: 8px;
  margin-bottom: 0;
}

.footer-newsletter__description {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  margin-top: 10px;
  margin-bottom: 0;
}

.footer-newsletter__field {
  margin-bottom: 12px;
}

.footer-newsletter__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  margin-bottom: 6px;
}

.footer-newsletter__input-group {
  display: flex;
  gap: 0;
}

.footer-newsletter__input-group input[type="email"] {
  flex: 1;
  height: 56px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.footer-newsletter__input-group input[type="email"]:focus {
  border-color: #bbb;
}

.footer-newsletter__input-group input[type="email"]::placeholder {
  color: #aaa;
}

.footer-newsletter__input-group button {
  height: 52px;
  padding: 0 18px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s;
}

.footer-newsletter__input-group button:hover {
  background: #1A963A;
}

.footer-newsletter__input-group button[disabled] {
  cursor: wait;
  opacity: .75;
}

/* ============================================
   PRIVACY
   ============================================ */
.newsletter-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

.newsletter-privacy__check {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid #ccc;
  border-radius: 3px;
  position: relative;
  transition: all 0.2s;
}

.newsletter-privacy input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.newsletter-privacy input[type="checkbox"]:checked + .newsletter-privacy__check {
  background: var(--prime-six);
  border-color: var(--prime-six);
}

.newsletter-privacy input[type="checkbox"]:checked + .newsletter-privacy__check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.newsletter-privacy input[type="checkbox"]:focus + .newsletter-privacy__check {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.newsletter-privacy__text {
  color: #ffffff;
}

.newsletter-privacy-dark {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #444;
  line-height: 1.4;
}

.newsletter-privacy-dark input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.newsletter-privacy-dark input[type="checkbox"]:checked + .newsletter-privacy__check {
  background: var(--prime-six);
  border-color: var(--prime-six);
}

.newsletter-privacy-dark input[type="checkbox"]:checked + .newsletter-privacy__check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.newsletter-privacy-dark input[type="checkbox"]:focus + .newsletter-privacy__check {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.newsletter-privacy-dark a {
  color: #141414;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.newsletter-privacy-dark a:hover {
  color: var(--prime-six);
  text-decoration-color: var(--prime-six);
}

.newsletter-privacy a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
  transition: all 0.2s;
}

.newsletter-privacy a:hover {
  color: var(--prime-six);
  text-decoration-color: var(--prime-six);
}

.footer-newsletter__privacy {
  margin-top: 4px;
}

.newsletter-field-error {
  min-height: 14px;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.4;
  color: #b42318;
}

/* ============================================
   TOAST
   ============================================ */
.newsletter-toast {
  position: fixed;
  right: 24px;
  top: 113px;
  z-index: 1000000;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid transparent;
  background: #fff;
  color: #1d2b40;
  box-shadow: 0 18px 45px rgba(29, 43, 64, 0.08);
}

.newsletter-toast[hidden] {display: none;}
.newsletter-toast--loading {border-color: #d7e9ff; background: #f2f8ff;}
.newsletter-toast--success {border-color: #b8ead2; background: #effcf6; color: #126b42;}
.newsletter-toast--error {border-color: #ffd0d0; background: #fff4f4; color: #9f1d1d;}

.newsletter-form .val-error,
.footer-newsletter-form .val-error {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12);
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 991px)
   ============================================ */
@media (max-width: 991px) {
  /* Homepage form */
  .newsletter-form .input-wrapper {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .newsletter-form .input-wrapper input {
    height: 60px;
  }

  .newsletter-form .search-btn {
    width: 100%;
    height: 60px;
  }

  .newsletter-privacy-wrapper {
    text-align: left;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
  .footer-newsletter__input-group {
    flex-direction: column;
    gap: 10px;
  }

  .footer-newsletter__input-group input[type="email"],
  .footer-newsletter__input-group button {
    width: 100%;
    border-radius: 4px;
  }

  .footer-newsletter__input-group input[type="email"] {
    height: 60px;
    padding: 0 18px;
    font-size: 16px;
  }

  .theme-basic-footer .form-widget .footer-newsletter-form .footer-newsletter__input-group input[type="email"] {
    height: 60px;
    min-height: 60px;
    padding: 0 18px;
    font-size: 16px;
    line-height: 60px;
  }

  .footer-newsletter__input-group button {
    height: 52px;
  }

  .theme-basic-footer .form-widget .footer-newsletter-form .footer-newsletter__input-group button {
    position: static;
    inset: auto;
    width: 100%;
    height: 52px;
  }

  .footer-newsletter__input-group input[type="email"] {
    border-right: 1px solid #e0e0e0;
  }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 575px)
   ============================================ */
@media (max-width: 575px) {
  .newsletter-toast {
    right: 16px;
    top: 90px;
  }

  .newsletter-form .input-wrapper input {
    height: 50px;
    font-size: 14px;
  }

  .newsletter-form .search-btn {
    height: 50px;
    font-size: 14px;
  }
}

/* Enterprise footer overrides: devono restare dopo gli stili legacy footer. */
.footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group {
  flex-direction: row;
  gap: 0;
  height: 69px;
  border: 1px solid #eceeec;
  border-radius: 0;
}

.footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group input[type="email"] {
  height: 100%;
  min-height: 0;
  padding: 0 27px;
  border: 0;
  border-radius: 0;
		font-size: 16px;
  line-height: 1;
}

.footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group button {
  position: static;
  inset: auto;
  flex: 0 0 145px;
  width: 145px;
  height: 100%;
  min-height: 0;
  margin: 0 !important;
  border-radius: 0;
		font-size: 16px;
  text-transform: none;
}

@media (max-width: 575.98px) {
  .footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group {
    height: 62px;
  }

  .footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group input[type="email"] {
    padding: 0 18px;
		font-size: 15px;
  }

  .footer-style-seven .giaffatto-footer-newsletter-form .giaffatto-footer-newsletter-input-group button {
    flex-basis: 118px;
    width: 118px;
		font-size: 15px;
  }
}
