/* Contact Page Specific Styles */

/* Map form colors to site theme */
:root {
    /* Page-specific overrides */
    --secondary-grey: #555;
    --tertiary-grey: #e0e0e0;
}

.hero {
    position: relative;
    background: #071225;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 16, 42, 0.84) 0%, rgba(6, 16, 42, 0.62) 38%, rgba(6, 16, 42, 0.2) 68%, rgba(6, 16, 42, 0) 100%),
        linear-gradient(180deg, rgba(6, 16, 42, 0.12) 0%, rgba(6, 16, 42, 0.44) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero .hero-image {
    background-image: url('../../images/1.webp');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
}

.hero .hero-content {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
}

.hero .hero-content h1 {
    max-width: 13ch;
    color: #fff;
    font-size: var(--fs-h1);
    line-height: 0.98;
    letter-spacing: 0;
}

.hero .contact-hero-subtitle {
    display: block;
    max-width: 54ch;
    margin: 0.65rem 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
}

.hero .contact-hero-lead {
    max-width: 54ch;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.86);
}

.radio-option {
    align-items: center; /* Better alignment */
}

/* Custom radio style to match site */
.radio-option input[type="radio"] {
    accent-color: var(--blue-1);
    width: 20px;
    height: 20px;
}

.contact-image--italia {
  background-image: url('../../images/LeoneGroup.webp');
}

.contact-card .card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.contact-image--dsl {
  background-image: url('../../../digital/Alleo/alleo_hero.webp');
  transform: scaleX(-1);
}

.contact-image--iso {
  background-image: url('../../images/academy/Leone90_day1-217.webp');
}

.contact-image--america {
  background-image: url('../../brand/leoneam03.webp');
}

.contact-image--francia {
  background-image: url('../../brand/Leone_france.webp');
}

.contact-section {
  padding-top: clamp(56px, 8vw, 108px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  border: 1px solid #dfe5ee;
  background: #fff;
}

.contact-panel__aside {
  padding: clamp(28px, 4vw, 56px);
  background: var(--blue-1);
}

.contact-panel__aside h2,
.contact-panel__aside p {
  color: #fff;
}

.contact-panel__aside h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.35rem);
  font-weight: 650;
  line-height: 1;
}

.contact-panel__aside p:not(.contact-eyebrow) {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.contact-routing {
  display: grid;
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.contact-routing li {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 700;
}

.contact-form {
  width: 100%;
  max-width: none;
  padding: clamp(28px, 4vw, 56px);
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: #273044;
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfd7e3;
  background: #f9fbfe;
  color: #121212;
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.contact-form input,
.contact-form select {
  min-height: 48px;
  padding: 12px 14px;
}

.contact-form textarea {
  min-height: 160px;
  padding: 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-1);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33, 78, 205, 0.12);
}

.contact-reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-form .radio-option--inline {
  width: auto;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1.15rem;
  border: 1px solid #d9e1f0;
  background: #fff;
  cursor: pointer;
}

.contact-form .radio-option--inline input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.support-fields {
  display: none;
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid #d9e4ff;
  background: #f8fbff;
}

.privacy-section--spaced {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.checkbox-container--inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-container--inline input {
  width: auto;
  min-height: auto;
}

.privacy-link {
  color: var(--blue-1);
}

.contact-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.contact-form .btn-primary {
  min-height: 46px;
  width: auto;
  padding: 12px 28px;
  background: var(--blue-1);
  border-color: var(--blue-1);
  font-weight: 800;
  text-transform: uppercase;
}

.contact-form .btn-primary:hover,
.contact-form .btn-primary:focus {
  background: #111;
  border-color: #111;
}

/* ==============================
   CONTACT LOCATION – DESKTOP
============================== */

.contact-location {
  width: 100%;
  padding: var(--site-section-gap) 0;
}

.contact-location__content {
  padding: 0 20px;
}

.contact-location__intro {
  margin-bottom: 2.5rem;
}

.contact-location__lead {
  max-width: 58ch;
  color: #51607d;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 0;
  align-items: stretch;
}

.contact-cards--global {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  position: relative;
  overflow: hidden;
  background: var(--blue-1);
  color: #fff;
  min-height: 0;
  box-shadow: 0 18px 48px rgba(33, 78, 205, 0.18);
  display: flex;
  flex-direction: column;
}

/* immagine */
.contact-card .card-image {
  position: relative;
  inset: auto;
  height: 240px;
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
}

.contact-card:hover .card-image {
  transform: scale(1.04);
}

.contact-card:hover .contact-image--dsl {
  transform: scaleX(-1) scale(1.04);
}

.contact-card h3 {
  position: absolute;
  left: 30px;
  z-index: 2;
  top: 54px;
  transform: none;
  font-size: 2rem;
  letter-spacing: 0;
  color: #fff;
}

/* contenuto sempre visibile */
.contact-card .secret {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  padding: 2rem 30px 30px;
  background: var(--blue-1);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
  flex: 1;
}

.contact-card .secret p {
  margin: 0;
  color: rgba(255,255,255,0.96);
  line-height: 1.6;
}

.contact-global-details {
  display: grid;
  grid-template-rows: minmax(3.2em, auto) auto auto;
  gap: 0.875rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.contact-cards--global .secret > p {
  min-height: 3.2em;
}

.contact-global-details__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  line-height: 1.6;
}

.contact-global-details dt {
  font-weight: 700;
}

.contact-global-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-global-details .contact-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .contact-global-details {
    grid-template-rows: auto;
  }

  .contact-global-details__row {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }
}

.distributor-shell {
  padding: 0 20px;
}

.distributor-section {
  padding: 4rem 0 3rem;
}

.distributor-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.distributor-count {
  color: var(--blue-1);
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.distributor-locator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #dfe6f2;
  background: #f8fbff;
}

.distributor-locator__copy h3 {
  margin: 0 0 0.45rem;
  color: #121212;
  font-size: 1.45rem;
}

.distributor-locator__copy p {
  max-width: 68ch;
  margin: 0;
  color: #51607d;
}

.distributor-zip-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.distributor-zip-form label {
  color: #121212;
  font-size: 0.9rem;
  font-weight: 700;
}

.distributor-zip-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.distributor-zip-form input {
  width: 100%;
  min-height: var(--btn-height);
  padding: 0 0.95rem;
  border: 1px solid #cfd8e8;
  background: #fff;
  color: #121212;
  font: inherit;
}

.distributor-map-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.distributor-nearest,
.distributor-map {
  min-height: 560px;
  border: 1px solid #dfe6f2;
  background: #fff;
}

.distributor-nearest {
  padding: 1rem;
  max-height: 680px;
  overflow: auto;
}

.distributor-nearest__empty {
  display: flex;
  align-items: center;
  min-height: 100%;
  color: #51607d;
}

.distributor-nearest__label {
  color: var(--blue-1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.distributor-nearest .distributor-card {
  min-height: auto;
  padding: 1rem;
  border: 1px solid #dfe6f2;
  box-shadow: none;
}

.distributor-results-list {
  display: grid;
  gap: 0.85rem;
}

.distributor-map {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(33, 78, 205, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(33, 78, 205, 0.08) 1px, transparent 1px),
    #f7f9fc;
  background-size: 44px 44px;
}

.distributor-map.leaflet-container {
  min-height: 560px;
  background: #e9eef5;
  font: inherit;
}

.distributor-map .leaflet-control-attribution {
  font-size: 0.68rem;
}

.distributor-region-marker {
  background: transparent;
  border: 0;
}

.distributor-region-marker__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--blue-1);
  box-shadow: 0 5px 16px rgba(15, 31, 67, 0.28);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-45deg);
}

.distributor-region-marker__pin span {
  transform: rotate(45deg);
}

.distributor-region-marker--selected .distributor-region-marker__pin {
  background: #121212;
  transform: rotate(-45deg) scale(1.12);
}

.distributor-map .leaflet-tooltip {
  border: 0;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(15, 31, 67, 0.18);
  color: #121212;
  font-family: inherit;
  font-weight: 700;
}

.distributor-map__placeholder {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  min-width: 220px;
  padding: 0.85rem 1rem;
  background: var(--blue-1);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.distributor-section--implantology {
  --blue-1: #c41230;
}

.distributor-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, 0.5fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.distributor-controls--without-area {
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.5fr);
}

.distributor-type-switch {
  min-width: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.distributor-type-switch legend {
  margin-bottom: 0.55rem;
  color: #121212;
  font-size: 0.9rem;
  font-weight: 700;
}

.distributor-type-switch__options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #d9e1ee;
  background: #eef3f9;
}

.distributor-type-switch label[hidden] {
  display: none !important;
}

html:not(:lang(it)) .distributor-type-switch label:has(input[value^="rete_vendita"]) {
  display: none !important;
}

.distributor-type-switch label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.distributor-type-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.distributor-type-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  background: #fff;
  color: #3f4d68;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.distributor-type-switch label:hover span {
  background: #f8faff;
  color: #121212;
}

.distributor-type-switch input:focus-visible + span {
  outline: 3px solid rgba(33, 78, 205, 0.28);
  outline-offset: 2px;
}

.distributor-type-switch input:checked + span {
  background: var(--blue-1);
  box-shadow: 0 5px 14px rgba(15, 31, 67, 0.18);
  color: #fff;
}

.distributor-type-switch__implantologia input:checked + span {
  background: #c41230;
}

.distributor-type-switch__ortodonzia input:checked + span {
  background: var(--blue-1);
}

.distributor-search,
.distributor-filter {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.distributor-filter[hidden] {
  display: none;
}

.distributor-search label,
.distributor-filter label {
  color: #121212;
  font-size: 0.9rem;
  font-weight: 700;
}

.distributor-search input,
.distributor-filter select {
  width: 100%;
  min-height: 48px;
  padding: 0 0.95rem;
  border: 1px solid #cfd8e8;
  background: #fff;
  color: #121212;
  font: inherit;
}

.distributor-status {
  min-height: 1.5rem;
  margin-bottom: 1.25rem;
  color: #51607d;
}

.distributor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.distributor-card {
  min-height: 220px;
  padding: 1.35rem;
  border: 1px solid #dfe6f2;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 31, 67, 0.06);
}

.distributor-card__meta {
  color: var(--blue-1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.distributor-card__meta--implantologia {
  color: #c41230;
}

.distributor-card__meta--ortodonzia {
  color: var(--blue-1);
}

.distributor-card h3 {
  margin: 0 0 0.85rem;
  color: #121212;
  font-size: 1.35rem;
  line-height: 1.18;
}

.distributor-card p {
  color: #3B3B3B;
  margin: 0;
}

.distributor-card__role {
  color: #51607d;
  font-weight: 700;
  margin-bottom: 0.75rem !important;
}

.distributor-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.distributor-card__link {
  color: var(--blue-1);
  font-weight: 700;
  text-decoration: none;
}

.distributor-card__link:hover {
  text-decoration: underline;
}

/* Contact Links Styling */
.contact-link {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  display: inline-block;
}

.contact-link:hover {
  text-decoration: none;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
  transform: translateX(2px);
}

.contact-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: rgba(255,255,255,0.9);
  transition: width 0.3s ease;
}

.contact-link:hover::after {
  width: 100%;
}

@media (max-width: 1024px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .distributor-controls,
  .distributor-map-layout,
  .distributor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    min-height: 0;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact-location {
    padding: var(--site-section-gap) 0;
  }

  .contact-location__content {
    padding: 0 16px;
  }

  .contact-card {
    min-height: 0;
  }

  .contact-card h3 {
    font-size: 1.7rem;
  }

  .contact-card .secret {
    padding: 1.5rem 22px 22px;
  }

  .contact-reason-row {
    flex-direction: column;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .radio-option--inline {
    width: 100%;
  }

  .distributor-section {
    padding: var(--site-section-gap) 0;
  }

  .distributor-shell {
    padding: 0 16px;
  }

  .distributor-header {
    display: block;
  }

  .distributor-locator {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .distributor-zip-form__row {
    grid-template-columns: 1fr;
  }

  .distributor-zip-form__row .btn {
    width: 100%;
  }

  .distributor-map-layout {
    grid-template-columns: 1fr;
  }

  .distributor-nearest,
  .distributor-map {
    min-height: 260px;
  }

  .distributor-map.leaflet-container {
    min-height: 380px;
  }

  .distributor-count {
    margin-top: 1rem;
    white-space: normal;
  }

  .distributor-controls,
  .distributor-grid {
    grid-template-columns: 1fr;
  }

  .distributor-type-switch__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .distributor-controls--without-area {
    grid-template-columns: 1fr;
  }
}

/* Esito dell'invio del modulo Contatti (14/10/2026) */
.contact-form__message {
  flex-basis: 100%;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.contact-form__message.is-success { background: #e4f4ea; color: #1f6b44; }
.contact-form__message.is-error { background: #fbe7e5; color: #a3241c; }

/* International distributors: type, search and country share one toolbar. */
html:not(:lang(it)) .distributor-type-switch__options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1025px) {
  html:not(:lang(it)) .distributor-toolbar {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
    align-items: end;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }
  html:not(:lang(it)) .distributor-toolbar .distributor-type-switch,
  html:not(:lang(it)) .distributor-toolbar .distributor-controls {
    margin-bottom: 0;
    min-width: 0;
  }
  html:not(:lang(it)) .distributor-type-switch__options {
    padding: 0;
    border: 0;
    background: transparent;
  }
  html:not(:lang(it)) .distributor-type-switch legend {
    margin-bottom: 0.45rem;
  }
  html:not(:lang(it)) .distributor-type-switch span {
    min-height: 48px;
  }
}

/* Give every desktop label and control the same grid rows. */
html:not(:lang(it)) .distributor-type-switch span {
  border: 1px solid #cfd8e8;
}
@media (min-width: 1025px) {
  html:not(:lang(it)) .distributor-toolbar {
    grid-template-columns: minmax(300px, 1fr) minmax(0, 1.45fr) minmax(180px, 0.55fr);
    grid-template-rows: auto 48px;
    gap: 0.45rem 1.25rem;
    align-items: stretch;
  }
  html:not(:lang(it)) .distributor-toolbar .distributor-type-switch,
  html:not(:lang(it)) .distributor-toolbar .distributor-controls,
  html:not(:lang(it)) .distributor-toolbar .distributor-search,
  html:not(:lang(it)) .distributor-toolbar .distributor-filter:not([hidden]) {
    display: contents;
  }
  html:not(:lang(it)) .distributor-toolbar .distributor-type-switch legend {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    padding: 0;
  }
  html:not(:lang(it)) .distributor-toolbar .distributor-type-switch__options {
    grid-column: 1;
    grid-row: 2;
  }
  html:not(:lang(it)) .distributor-toolbar .distributor-search label { grid-column: 2; grid-row: 1; }
  html:not(:lang(it)) .distributor-toolbar .distributor-search input { grid-column: 2; grid-row: 2; }
  html:not(:lang(it)) .distributor-toolbar label[for="distributor-country"] { grid-column: 3; grid-row: 1; }
  html:not(:lang(it)) .distributor-toolbar #distributor-country { grid-column: 3; grid-row: 2; }
  html:not(:lang(it)) .distributor-toolbar .distributor-type-switch span {
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;
  }
}

/* Direct product enquiries land below the fixed navigation. */
#form-contatti { scroll-margin-top: calc(var(--leone-fixed-header-offset, 86px) + 24px); }

.contact-form .form-row > * {
  min-width: 0;
}

.contact-form :is(input, select, textarea, button):focus-visible {
  outline: 2px solid var(--blue-1);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .contact-form {
    padding: 1rem;
  }

  .contact-form__footer .btn-primary {
    width: 100%;
  }
}
