/*=============================================
=            Palette variabili                =
=============================================*/
:root {
  /* Colori principali del sito */
  --clr-bg: #23386a;            /* blu/navy di sfondo */
  --clr-accent: #6acaf1;        /* azzurro chiaro accent */
  --clr-accent-light: #a2e0ff;  /* azzurro pastello */
  --clr-gold: #f7dc6f;          /* giallo logo */

  /* Testi */
  --clr-text: #ffffff;              /* bianco puro */
  --clr-text-light: rgba(255,255,255,0.8);  /* bianco semitrasp. */

  /* Bordi e ombre */
  --clr-border: #5173a3;        /* bordo soft */
  --shadow: rgba(0, 0, 0, 0.1);  /* ombra delicata */
}

/*==================================
=    Reset e impostazioni base     =
==================================*/
.vg-container,
.vg-search {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
  color: var(--clr-text);
}

/*==================================
=          Sezione ricerca         =
==================================*/
.vg-search {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.vg-search input#vg-search {
  width: 100%;
  max-width: 500px;
  padding: 16px 24px;
  font-size: 16px;
  border: 2px solid var(--clr-border);
  border-radius: 50px;
  background: var(--clr-bg);
  color: var(--clr-text);
  box-shadow: 0 4px 20px var(--shadow);
  transition: all 0.3s ease;
  outline: none;
  margin: 0 auto;
  display: block;
}

.vg-search input#vg-search:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 4px 25px rgba(106, 202, 241, 0.25);
  transform: translateY(-2px);
}

.vg-search input#vg-search::placeholder {
  color: var(--clr-text-light);
}

/*==================================
=        Container principale      =
==================================*/
.vg-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  justify-items: center;
}

/*==================================
=           Card delle guide       =
==================================*/
.vg-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  width: 100%;
  max-width: 400px;
}

.vg-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/*==================================
=     Wrapper immagine quadrato    =
==================================*/
.vg-image-wrapper,
.vg-image-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(
    135deg,
    var(--clr-accent-light) 0%,
    var(--clr-accent) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vg-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
}

.vg-card:hover img {
  transform: scale(1.1);
}

/*==================================
=         Corpo della card         =
==================================*/
.vg-card-body {
  padding: 30px 25px;
  background: var(--clr-bg);
  text-align: center;
}

/*  Titolo in bianco, override */
.vg-card-body h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #ffffff !important;
}

/* Descrizione guida */
.vg-description {
  font-size: 14px;
  font-style: italic;
  color: var(--clr-text-light);
  margin: 0 0 20px;
}

/*==================================
=        Dettagli contatto         =
==================================*/
.vg-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.vg-details p {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--clr-accent-light);
  border-left: 4px solid var(--clr-accent);
  border-radius: 12px;
  color: var(--clr-bg);
  transition: background 0.3s ease, transform 0.3s ease;
}

.vg-details p:hover {
  background: var(--clr-accent);
  transform: translateX(5px);
}

.vg-details i {
  margin-right: 12px;
  color: var(--clr-bg);
}

.vg-details a {
  color: var(--clr-bg);
  text-decoration: none;
  margin-left: 4px; /* spazio dopo label */
}

.vg-details a:hover {
  text-decoration: underline;
}

/*==================================
=       Badge professionale        =
==================================*/
.vg-card::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--clr-gold);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(247, 220, 111, 0.4);
  z-index: 2;
}

.vg-card::after {
  content: '★';
  position: absolute;
  top: 30px;
  right: 30px;
  color: var(--clr-bg);
  font-size: 18px;
  font-weight: bold;
  z-index: 3;
}

/*==================================
=      Contatti ristrutturati      =
==================================*/
.vg-contact-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--clr-accent-light);
  border-left: 4px solid var(--clr-accent);
  border-radius: 12px;
  color: var(--clr-bg);
  transition: background 0.3s ease, transform 0.3s ease;
}

.vg-contact-item:hover {
  background: var(--clr-accent);
  transform: translateX(5px);
}

.vg-contact-item i {
  margin-right: 12px;
  color: var(--clr-bg);
}

.vg-contact-item span {
  font-weight: 600;
}

.vg-contact-item a {
  color: var(--clr-bg);
  text-decoration: none;
  margin-left: 4px; /* spazio dopo label */
  white-space: nowrap;     /* non andare a capo */
  overflow: hidden;        /* nascondi l’eccesso */
  text-overflow: ellipsis; /* mostra i tre puntini */
  vertical-align: middle;
}

.vg-contact-item a:hover {
  text-decoration: underline;
}

/*==================================
=      Stato nascosto (ricerca)    =
==================================*/
.vg-card[style*="display: none"] {
  display: none !important;
}

/*==================================
=     Animazione fadeInUp cards    =
==================================*/
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.vg-card {
  animation: fadeInUp 0.6s ease forwards;
}
.vg-card:nth-child(1) { animation-delay: .1s; }
.vg-card:nth-child(2) { animation-delay: .2s; }
.vg-card:nth-child(3) { animation-delay: .3s; }
.vg-card:nth-child(4) { animation-delay: .4s; }
.vg-card:nth-child(5) { animation-delay: .5s; }
.vg-card:nth-child(6) { animation-delay: .6s; }

/*==================================
=      Contatore risultati         =
==================================*/
.vg-results-counter {
  text-align: center;
  margin-top: 10px;
  color: var(--clr-text-light);
}
.vg-results-counter small {
  font-size: 13px;
  padding: 4px 12px;
  background: var(--clr-accent-light);
  border-radius: 20px;
}

/*==================================
=    Messaggi “nessuna guida”      =
==================================*/
.vg-no-guides,
.vg-no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--clr-text-light);
  padding: 60px 20px;
}
.vg-no-guides i,
.vg-no-results i {
  font-size: 48px;
  color: var(--clr-accent-light);
  margin-bottom: 20px;
}
.vg-no-guides h3,
.vg-no-results h3 {
  font-size: 24px;
  color: var(--clr-text);
  margin-bottom: 10px;
}
.vg-no-guides p,
.vg-no-results p {
  font-size: 16px;
}

/*==================================
=     Focus & accessibilità        =
==================================*/
.vg-card:focus-within {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
}

/*==================================
=        Responsive design         =
==================================*/
@media (max-width: 768px) {
  .vg-container {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
  }
  .vg-search {
    padding: 0 15px;
    margin-bottom: 30px;
  }
  .vg-search input#vg-search {
    padding: 14px 20px;
    font-size: 15px;
  }
  .vg-card-body {
    padding: 25px 20px;
  }
  .vg-card-body h3 {
    font-size: 22px;
  }
  .vg-image-wrapper,
  .vg-image-placeholder {
    aspect-ratio: 1/1;
  }
}

@media (max-width: 480px) {
  .vg-search input#vg-search {
    padding: 12px 18px;
    font-size: 14px;
  }
  .vg-card-body h3 {
    font-size: 20px;
  }
  .vg-details p,
  .vg-contact-item {
    padding: 10px 14px;
    font-size: 14px;
  }
  .vg-image-wrapper,
  .vg-image-placeholder {
    aspect-ratio: 1/1;
  }
}

/*==================================
=        Stili per stampa          =
==================================*/
@media print {
  .vg-search {
    display: none;
  }
  .vg-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--clr-border);
  }
  .vg-card a {
    text-decoration: underline;
  }
}

/*===========================================================
=   OVERRIDE: colore oro solo per link email e telefono    =
===========================================================*/

/*===========================================================
=   OVERRIDE: colore personalizzato per email e telefono    =
===========================================================*/
.vg-contact-item a[href^="mailto:"],
.vg-contact-item a[href^="tel:"] {
  color: #78CFF4 !important;
}

/*==================================
=       Bandierine lingua          =
==================================*/
.vg-languages {
  font-size: 20px;
  margin-bottom: 10px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}