/**
 * Immobiliare San Pietro - Template Cantiere CPT
 * Isolamento CSS Rigoroso per Elementor & Temi WordPress
 * 
 * Tutti i selettori sono rigorosamente isolati sotto .isp-cantiere-template
 * per impedire collisioni con i reset di Elementor e stili tema genitore.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Source+Sans+3:wght@300;400;600;700;800&display=swap');

/* --- SCOPED RESET & VARIABILI --- */
.isp-cantiere-template {
  --theme: #DC5A28;
  --theme-dark: #b84820;
  --theme-light: rgba(220, 90, 40, 0.08);
  --theme-border: rgba(220, 90, 40, 0.18);
  --theme-focus: rgba(220, 90, 40, 0.25);
  --black: #101010;
  --grey: #555555;
  --light-bg: #f0ede8;
  --shadow-card: 0 3px 10px rgba(0, 0, 0, 0.09);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.14);
  --radius-card: 10px;
  --radius-img: 5px;

  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  background-color: #f5f5f5;
  color: #101010;
  line-height: 1.5;
  font-size: 16px;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box;
}

.isp-cantiere-template *,
.isp-cantiere-template *::before,
.isp-cantiere-template *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

.isp-cantiere-template img {
  max-width: 100%;
  height: auto;
  display: block;
}

.isp-cantiere-template a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* --- HEADER DEDICATO --- */
.isp-cantiere-template .isp-header {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.isp-cantiere-template .isp-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.isp-cantiere-template .isp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.isp-cantiere-template .isp-brand__badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--theme);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 15px;
  transition: background 0.3s ease;
  flex-shrink: 0;
  text-transform: uppercase;
}

.isp-cantiere-template .isp-brand__logo-img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.isp-cantiere-template .isp-brand__name {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #101010;
  line-height: 1.2;
}

.isp-cantiere-template .isp-brand__tagline {
  font-size: 11px;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}

.isp-cantiere-template .isp-nav--desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.isp-cantiere-template .isp-nav__link {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: #555555;
  transition: color 0.2s ease;
}

.isp-cantiere-template .isp-nav__link:hover {
  color: #101010;
}

.isp-cantiere-template .isp-nav__cta {
  background: var(--theme) !important;
  color: #ffffff !important;
  padding: 9px 20px !important;
  border-radius: 5px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: background 0.2s ease, transform 0.15s ease !important;
  display: inline-block;
}

.isp-cantiere-template .isp-nav__cta:hover {
  background: var(--theme-dark) !important;
  transform: translateY(-1px);
}

.isp-cantiere-template .isp-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #333333;
  padding: 4px;
}

.isp-cantiere-template .isp-nav--mobile {
  display: none;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
  padding: 10px 16px 14px;
}

.isp-cantiere-template .isp-nav--mobile.open {
  display: block;
}

.isp-cantiere-template .isp-nav--mobile .isp-nav__link {
  display: block;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 15px;
  color: #333333;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.isp-cantiere-template .isp-nav--mobile .isp-nav__link:hover {
  background: #fafafa;
}

.isp-cantiere-template .isp-nav--mobile .isp-nav__cta {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* --- HERO SECTION --- */
.isp-cantiere-template .isp-hero {
  position: relative;
  height: 78vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #1a1a1a;
}

.isp-cantiere-template .isp-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.isp-cantiere-template .isp-hero__overlay-color {
  position: absolute;
  inset: 0;
  background: var(--theme);
  opacity: 0.72;
  mix-blend-mode: multiply;
  transition: background 0.3s ease;
}

.isp-cantiere-template .isp-hero__overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 70%);
}

.isp-cantiere-template .isp-hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
  max-width: 860px;
  margin-top: 30px;
}

.isp-cantiere-template .isp-hero__badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.isp-cantiere-template .isp-hero__title {
  font-family: 'Poppins', sans-serif !important;
  font-size: clamp(2.2rem, 6.5vw, 4.4rem) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.08 !important;
  margin-bottom: 16px !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.isp-cantiere-template .isp-hero__sub {
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  margin-bottom: 32px;
  line-height: 1.5;
}

.isp-cantiere-template .isp-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--theme) !important;
  padding: 14px 34px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.isp-cantiere-template .isp-hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* --- SEZIONI GENERALI --- */
.isp-cantiere-template .isp-section {
  padding: 80px 24px;
}

.isp-cantiere-template .isp-container {
  max-width: 1200px;
  margin: 0 auto;
}

.isp-cantiere-template .isp-section__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--theme);
  margin-bottom: 6px;
  display: block;
}

.isp-cantiere-template .isp-section__title {
  font-family: 'Poppins', sans-serif !important;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem) !important;
  font-weight: 700 !important;
  color: #101010 !important;
  line-height: 1.2 !important;
}

.isp-cantiere-template .isp-section__header--center {
  text-align: center;
  margin-bottom: 48px;
}

.isp-cantiere-template .isp-section__sub {
  font-size: 1rem;
  color: #666666;
  margin-top: 8px;
}

/* --- PROGETTO --- */
.isp-cantiere-template .isp-section--project {
  background: #ffffff;
}

.isp-cantiere-template .isp-project__list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.isp-cantiere-template .isp-project__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Layout alternato: Immagine a sinistra, Testo a destra */
.isp-cantiere-template .isp-project__grid--reverse .isp-project__content {
  order: 2;
}

.isp-cantiere-template .isp-project__grid--reverse .isp-project__img-wrap {
  order: 1;
}

.isp-cantiere-template .isp-project__grid--reverse .isp-project__img-wrap::before {
  transform: translate(-14px, 14px);
}

/* Layout senza immagine: Testo a larghezza piena (100% delle 2 colonne) */
.isp-cantiere-template .isp-project__grid--fullwidth {
  display: block;
  width: 100%;
}

.isp-cantiere-template .isp-project__grid--fullwidth .isp-project__content {
  width: 100%;
  max-width: 100%;
}

.isp-cantiere-template .isp-project__grid--fullwidth .isp-features-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 100%;
}

.isp-cantiere-template .isp-project__desc {
  font-size: 1rem;
  color: #555555;
  line-height: 1.75;
  margin-bottom: 14px;
}

.isp-cantiere-template .isp-project__desc p {
  margin-bottom: 14px;
}

.isp-cantiere-template .isp-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

.isp-cantiere-template .isp-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333333;
}

.isp-cantiere-template .isp-feature-dot {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--theme);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.isp-cantiere-template .isp-feature-dot svg {
  width: 12px;
  height: 12px;
  stroke: #ffffff;
}

.isp-cantiere-template .isp-project__img-wrap {
  position: relative;
}

.isp-cantiere-template .isp-project__img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: var(--theme);
  opacity: 0.12;
  transform: translate(14px, 14px);
  transition: background 0.3s ease, transform 0.3s ease;
}

.isp-cantiere-template .isp-project__img-wrap img {
  position: relative;
  border-radius: var(--radius-card);
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 514/314;
  box-shadow: var(--shadow-card);
}

/* --- IMMOBILI / UNITÀ DISPONIBILI --- */
.isp-cantiere-template .isp-section--properties {
  background: #f5f5f5;
}

.isp-cantiere-template .isp-properties__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.isp-cantiere-template .isp-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  position: relative;
}

.isp-cantiere-template .isp-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.isp-cantiere-template .isp-card__img-wrap {
  position: relative;
  aspect-ratio: 514/314;
  overflow: hidden;
  border-radius: var(--radius-img);
  margin: 8px 8px 0;
  background-color: #e5e7eb;
}

.isp-cantiere-template .isp-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.isp-cantiere-template .isp-card:hover .isp-card__img-wrap img {
  transform: scale(1.05);
}

.isp-cantiere-template .isp-card__badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 5;
}

.isp-cantiere-template .isp-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.isp-cantiere-template .isp-badge--blue   { background: #1a5cb8; }
.isp-cantiere-template .isp-badge--green  { background: #1a8c4e; }
.isp-cantiere-template .isp-badge--orange { background: var(--theme); }
.isp-cantiere-template .isp-badge--grey   { background: #6b7280; }

.isp-cantiere-template .isp-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.isp-cantiere-template .isp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.isp-cantiere-template .isp-card__location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #555555;
}

.isp-cantiere-template .isp-card__location svg {
  flex-shrink: 0;
}

.isp-cantiere-template .isp-card__price {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--theme);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.isp-cantiere-template .isp-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.isp-cantiere-template .isp-card__desc {
  font-size: 13px;
  color: #555555;
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.isp-cantiere-template .isp-details-strip {
  background: var(--theme-light);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-img);
  padding: 10px 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin-bottom: 14px;
}

.isp-cantiere-template .isp-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--theme-border);
  padding: 2px 8px;
}

.isp-cantiere-template .isp-detail:last-child {
  border-right: none;
}

.isp-cantiere-template .isp-detail__vals {
  display: flex;
  align-items: center;
  gap: 4px;
}

.isp-cantiere-template .isp-detail__num {
  font-size: 15px;
  font-weight: 700;
  color: #101010;
}

.isp-cantiere-template .isp-detail__lbl {
  font-size: 11px;
  color: #555555;
  margin-top: 3px;
  text-align: center;
}

.isp-cantiere-template .isp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.isp-cantiere-template .isp-card__ref {
  font-size: 13px;
  color: #888888;
  font-weight: 400;
  line-height: 1.2;
}

.isp-cantiere-template .isp-card__ref strong {
  color: #555555;
  font-weight: 700;
}

.isp-cantiere-template .isp-card__cta {
  background: var(--theme) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 9px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.15s ease !important;
  white-space: nowrap;
  display: inline-block;
}

.isp-cantiere-template .isp-card__cta:hover {
  background: var(--theme-dark) !important;
  transform: translateY(-1px);
}

/* --- MAPPA / POSIZIONE --- */
.isp-cantiere-template .isp-section--map {
  background: #ffffff;
}

.isp-cantiere-template .isp-map__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.isp-cantiere-template .isp-map__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.isp-cantiere-template .isp-map__desc {
  font-size: 0.98rem;
  color: #555555;
  line-height: 1.7;
}

.isp-cantiere-template .isp-map__address-card {
  background: var(--theme-light);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.isp-cantiere-template .isp-map__address-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: #333333;
}

.isp-cantiere-template .isp-map__address-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--theme);
}

.isp-cantiere-template .isp-map__address-row strong {
  font-weight: 700;
  color: #101010;
}

.isp-cantiere-template .isp-map__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--theme) !important;
  color: #ffffff !important;
  padding: 11px 22px !important;
  border-radius: 5px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease !important;
  width: fit-content;
}

.isp-cantiere-template .isp-map__btn:hover {
  background: var(--theme-dark) !important;
  transform: translateY(-1px);
}

.isp-cantiere-template .isp-map__embed-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  height: 420px;
  background: #f0ede8;
}

.isp-cantiere-template .isp-map__embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.isp-cantiere-template .isp-map__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: #888888;
  font-size: 0.92rem;
  text-align: center;
  padding: 24px;
}

.isp-cantiere-template .isp-map__placeholder svg {
  opacity: 0.4;
  stroke: var(--theme);
}

/* --- CONTATTI --- */
.isp-cantiere-template .isp-section--contact {
  background: #f5f5f5;
}

.isp-cantiere-template .isp-contact__box {
  display: grid;
  grid-template-columns: 5fr 8fr;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.isp-cantiere-template .isp-contact__left {
  background: var(--theme);
  padding: 52px 40px;
  color: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.isp-cantiere-template .isp-contact__dots {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
}

.isp-cantiere-template .isp-contact__left-inner {
  position: relative;
  z-index: 1;
}

.isp-cantiere-template .isp-contact__left h2 {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin-bottom: 8px !important;
}

.isp-cantiere-template .isp-contact__left-inner > p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

.isp-cantiere-template .isp-agency-card {
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  color: #101010;
}

.isp-cantiere-template .isp-agency-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.isp-cantiere-template .isp-agency-head svg {
  color: var(--theme);
  stroke: var(--theme);
  flex-shrink: 0;
}

.isp-cantiere-template .isp-agency-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #101010 !important;
}

.isp-cantiere-template .isp-agency-branch {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #666666 !important;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 9px;
  margin-bottom: 12px;
}

.isp-cantiere-template .isp-agency-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.isp-cantiere-template .isp-agency-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #222222 !important;
}

.isp-cantiere-template .isp-agency-row a {
  color: #101010 !important;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  transition: color 0.2s ease;
}

.isp-cantiere-template .isp-agency-row a:hover {
  color: var(--theme) !important;
}

.isp-cantiere-template .isp-agency-row svg {
  flex-shrink: 0;
  color: var(--theme);
  stroke: var(--theme);
  margin-top: 2px;
}

.isp-cantiere-template .isp-contact__note {
  font-size: 12px;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin-top: 20px;
  position: relative;
  z-index: 1;
  line-height: 1.45;
}

.isp-cantiere-template .isp-contact__right {
  background: #ffffff;
  padding: 52px 48px;
}

.isp-cantiere-template .isp-contact__right h3 {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  margin-bottom: 24px !important;
  color: #101010 !important;
}

/* FORM DI CONTATTO */
.isp-cantiere-template .isp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.isp-cantiere-template .isp-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.isp-cantiere-template .isp-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.isp-cantiere-template .isp-form__group label {
  font-size: 13px;
  font-weight: 700;
  color: #333333;
}

.isp-cantiere-template .isp-form__group input,
.isp-cantiere-template .isp-form__group select,
.isp-cantiere-template .isp-form__group textarea {
  padding: 11px 14px !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 5px !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  color: #101010 !important;
  outline: none !important;
  background: #ffffff !important;
  width: 100% !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.isp-cantiere-template .isp-form__group input:focus,
.isp-cantiere-template .isp-form__group select:focus,
.isp-cantiere-template .isp-form__group textarea:focus,
.isp-cantiere-template .isp-form__group input:active,
.isp-cantiere-template .isp-form__group select:active,
.isp-cantiere-template .isp-form__group textarea:active,
.isp-cantiere-template .isp-form__group input:focus-visible,
.isp-cantiere-template .isp-form__group select:focus-visible,
.isp-cantiere-template .isp-form__group textarea:focus-visible {
  border-color: var(--theme) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--theme-focus) !important;
}

.isp-cantiere-template .isp-form__group textarea {
  resize: vertical;
}

.isp-cantiere-template .isp-form__privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.isp-cantiere-template .isp-form__privacy input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--theme);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.isp-cantiere-template .isp-form__privacy label {
  font-size: 12px;
  color: #777777;
  line-height: 1.4;
  cursor: pointer;
}

.isp-cantiere-template .isp-recaptcha-inline {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11px;
  color: #64748b;
  width: fit-content;
  max-width: 100%;
  gap: 16px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.isp-cantiere-template .isp-recaptcha-inline__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.isp-cantiere-template .isp-recaptcha-inline__brand svg {
  flex-shrink: 0;
}

.isp-cantiere-template .isp-recaptcha-inline__brand strong {
  color: #1e293b;
  font-weight: 700;
}

.isp-cantiere-template .isp-recaptcha-inline__links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.isp-cantiere-template .isp-recaptcha-inline__links a {
  color: #64748b;
  text-decoration: underline;
  text-decoration-color: rgba(100, 116, 139, 0.4);
  transition: color 0.2s ease;
}

.isp-cantiere-template .isp-recaptcha-inline__links a:hover {
  color: var(--theme);
}

/* Nasconde l'icona flottante di Google reCAPTCHA v3 a bordo finestra */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.isp-cantiere-template .isp-form__submit {
  align-self: flex-start;
  padding: 13px 34px !important;
  border: none !important;
  border-radius: 5px !important;
  background: var(--theme) !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.15s ease !important;
}

.isp-cantiere-template .isp-form__submit:hover {
  background: var(--theme-dark) !important;
  transform: translateY(-1px);
}

.isp-cantiere-template .isp-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- FOOTER DEDICATO --- */
.isp-cantiere-template .isp-footer {
  background: #101010;
  text-align: center;
  padding: 28px 24px;
  border-top: 4px solid var(--theme);
  transition: border-color 0.3s ease;
}

.isp-cantiere-template .isp-footer p {
  color: #888888;
  font-size: 13px;
  margin-bottom: 4px;
}

.isp-cantiere-template .isp-footer p:last-child {
  font-size: 11px;
  color: #666666;
}

.isp-cantiere-template .isp-footer strong {
  color: #cccccc;
}

/* --- TOAST NOTIFICATIONS (ENHANCED) --- */
.isp-cantiere-template .isp-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-40px) scale(0.96);
  background: #ffffff;
  color: #1e293b;
  padding: 16px 22px;
  border-radius: 12px;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 999999;
  width: auto;
  min-width: 360px;
  max-width: 92vw;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.isp-cantiere-template .isp-toast.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.isp-cantiere-template .isp-toast__icon {
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.isp-cantiere-template .isp-toast__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.isp-cantiere-template .isp-toast__title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
}

.isp-cantiere-template .isp-toast__message {
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: #475569 !important;
}

.isp-cantiere-template .isp-toast__close {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 4px !important;
  margin-left: 6px !important;
  transition: color 0.15s ease !important;
}

.isp-cantiere-template .isp-toast__close:hover {
  color: #1e293b !important;
}

/* Varianti di stato per il Toast */
.isp-cantiere-template .isp-toast--success {
  border-left: 6px solid #10b981;
}
.isp-cantiere-template .isp-toast--success .isp-toast__title {
  color: #065f46 !important;
}

.isp-cantiere-template .isp-toast--error {
  border-left: 6px solid #ef4444;
}
.isp-cantiere-template .isp-toast--error .isp-toast__title {
  color: #991b1b !important;
}

.isp-cantiere-template .isp-toast--warning {
  border-left: 6px solid #f59e0b;
}
.isp-cantiere-template .isp-toast--warning .isp-toast__title {
  color: #92400e !important;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 900px) {
  .isp-cantiere-template .isp-project__list {
    gap: 48px;
  }

  .isp-cantiere-template .isp-project__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .isp-cantiere-template .isp-project__img-wrap {
    order: -1;
  }

  .isp-cantiere-template .isp-project__grid--reverse .isp-project__content {
    order: 1;
  }

  .isp-cantiere-template .isp-project__grid--reverse .isp-project__img-wrap {
    order: -1;
  }

  .isp-cantiere-template .isp-project__grid--reverse .isp-project__img-wrap::before {
    transform: translate(14px, 14px);
  }
  
  .isp-cantiere-template .isp-contact__box {
    grid-template-columns: 1fr;
  }
  
  .isp-cantiere-template .isp-contact__right {
    padding: 36px 24px;
  }
  
  .isp-cantiere-template .isp-contact__left {
    padding: 36px 24px;
  }

  .isp-cantiere-template .isp-map__grid {
    grid-template-columns: 1fr;
  }

  .isp-cantiere-template .isp-map__embed-wrap {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .isp-cantiere-template .isp-nav--desktop {
    display: none;
  }

  .isp-cantiere-template .isp-burger {
    display: block;
  }

  .isp-cantiere-template .isp-section {
    padding: 56px 16px;
  }

  .isp-cantiere-template .isp-form__row {
    grid-template-columns: 1fr;
  }

  .isp-cantiere-template .isp-features-list {
    grid-template-columns: 1fr;
  }

  .isp-cantiere-template .isp-form__submit {
    width: 100%;
  }

  .isp-cantiere-template .isp-properties__grid {
    grid-template-columns: 1fr;
  }
}
