/* Import base styles */
@import url("styles.css");

/* Contacts Section */
.contacts-section {
  padding: 4rem 0;
  background: #f8f9fa;
  min-height: 60vh;
}

/* Contact Cards Section - Prima riga */
.contact-cards-section {
  margin-bottom: 4rem;
}

.section-title {
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-card-modern {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-card-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.address-card .contact-card-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.contact-details-card .contact-card-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hours-card .contact-card-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.facebook-card .contact-card-icon {
  background: #1877f2;
}

.instagram-card .contact-card-icon {
  background: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
}

.contact-card-content {
  flex: 1;
}

.contact-card-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.contact-card-text {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.contact-link {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
}

.contact-link:hover {
  color: #667eea;
}

.contact-card-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-card-link:hover {
  text-decoration: underline;
}

.hours-highlight {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 1.1rem;
}

/* Social e Form Grid - Seconda riga */
.social-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

/* Social Cards Row - Horizontal Layout */
.social-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

/* Social Widget Base Styles */
.social-widget {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e1e5e9;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Facebook Widget Styling */
.facebook-widget {
  border-left: 4px solid #1877f2;
}

.facebook-widget:hover {
  border-left-color: #166fe5;
  box-shadow: 0 8px 32px rgba(24, 119, 242, 0.15);
}

/* Instagram Widget Styling */
.instagram-widget {
  border-left: 4px solid #e4405f;
  background: linear-gradient(
    135deg,
    rgba(131, 58, 180, 0.02) 0%,
    rgba(253, 29, 29, 0.02) 50%,
    rgba(252, 176, 64, 0.02) 100%
  );
}

.instagram-widget:hover {
  border-left-color: #c13584;
  box-shadow: 0 8px 32px rgba(228, 64, 95, 0.15);
}

/* Widget Header */
.widget-header {
  margin-bottom: 1rem;
}

.widget-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.widget-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.facebook-avatar {
  background: #1877f2;
}

.instagram-avatar {
  background: linear-gradient(45deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.widget-info {
  flex: 1;
  min-width: 0;
}

.widget-name {
  font-family: "Roboto", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1c1e21;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.widget-username {
  font-size: 0.85rem;
  color: #65676b;
  margin: 0;
  line-height: 1.2;
}

/* Widget Stats */
.widget-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid #e4e6ea;
  border-bottom: 1px solid #e4e6ea;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1c1e21;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Widget Actions */
.widget-actions {
  display: flex;
  justify-content: center;
}

.widget-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
}

.facebook-button {
  background: #1877f2;
  color: white;
}

.facebook-button:hover {
  background: #166fe5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.instagram-button {
  background: linear-gradient(45deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: white;
}

.instagram-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(228, 64, 95, 0.3);
  filter: brightness(1.1);
}

/* Contact Form Container */
.contact-form-container {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-main-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  text-align: center;
}

.form-description {
  color: #666;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-buttons .btn {
  flex: 1;
  max-width: 50%;
  min-width: 0;
  width: 50%;
  box-sizing: border-box;
  text-align: center;
}

/* Contact Form */
.contact-form-section {
  border-top: 1px solid #e9ecef;
  padding-top: 2rem;
}

.form-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-submit {
  margin-top: 1rem;
  align-self: stretch;
}

/* Contact Form Messages */
.form-message {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-weight: 500;
  text-align: center;
}

.form-message-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Maps Section - Terza riga */
.maps-section {
  margin-top: 2rem;
}

.maps-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.maps-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.google-maps-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  height: 450px;
}

.google-maps-embed iframe {
  height: inherit;
}

/* Footer styles rimossi: ora in footer.css */

/* Followers Counter - Migliorato */
.followers-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.followers-number {
  font-family: "Roboto", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.followers-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
}

/* Effetto hover per i contatori */
.contact-card-modern:hover .followers-count {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Stili specifici per Facebook */
.facebook-card:hover .followers-count {
  background: rgba(66, 103, 178, 0.2);
  border-color: rgba(66, 103, 178, 0.4);
}

/* Stili specifici per Instagram */
.instagram-card:hover .followers-count {
  background: linear-gradient(
    45deg,
    rgba(225, 48, 108, 0.2),
    rgba(255, 204, 119, 0.2)
  );
  border-color: rgba(225, 48, 108, 0.4);
}

/* Responsive per piccoli desktop/schermi medi (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  /* PICCOLI DESKTOP: Layout personalizzato per le card info */
  .contact-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "address address"
      "contact hours";
    gap: 1rem;
  }

  /* Address card: Full width (prima riga) */
  .address-card {
    grid-area: address;
    width: 100% !important;
  }

  /* Contact-details: sinistra (seconda riga) */
  .contact-details-card {
    grid-area: contact;
    width: 100% !important;
  }

  /* Hours: destra (seconda riga) */
  .hours-card {
    grid-area: hours;
    width: 100% !important;
  }

  /* Maps e form: Full width */
  .maps-form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Social cards restano affiancate */
  .social-cards-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  /* Assicuriamoci che maps e form siano full width */
  .maps-container,
  .contact-form-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Riduci spaziature generali */
  .contact-cards-section,
  .social-section,
  .maps-form-section {
    margin: 1rem 0;
  }

  /* Mappa */
  .google-maps-embed {
    height: 400px !important;
    width: 100% !important;
  }

  .google-maps-embed iframe {
    height: 400px !important;
    width: 100% !important;
  }
}

/* Responsive per tablet/mobile (≤768px) - TUTTO full width */
@media (max-width: 768px) {
  /* TABLET/MOBILE: TUTTE le grid diventano single column */
  .contact-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem; /* Spaziatura dimezzata: era 2rem */
  }

  .social-cards-row {
    grid-template-columns: 1fr !important;
    gap: 1rem; /* Spaziatura dimezzata: era 2rem */
  }

  .maps-form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem; /* Spaziatura dimezzata: era 2rem */
  }

  .social-form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem; /* Spaziatura dimezzata: era 2rem */
  }

  /* Assicuriamoci che le card stesse siano full width */
  .contact-card-modern,
  .social-widget,
  .maps-container,
  .contact-form-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Riduci spaziature generali su tablet/mobile */
  .contact-cards-section,
  .social-section,
  .maps-form-section {
    margin: 1rem 0; /* Spaziatura dimezzata: era 2rem */
  }

  .social-widget {
    padding: 1.25rem;
  }

  .widget-stats {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .widget-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 100px;
  }

  /* Mappa ridotta su tablet */
  .google-maps-embed {
    height: 350px !important;
    width: 100% !important;
  }

  .google-maps-embed iframe {
    height: 350px !important;
    width: 100% !important;
  }
}

/* Responsive per mobile piccoli (≤480px) - Layout ultra-compatto */
@media (max-width: 480px) {
  /* Mobile piccoli: layout ancora più compatto */
  .contact-card-modern {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .contact-card-icon {
    align-self: center;
  }

  .contacts-section {
    padding: 2rem 0;
  }

  /* Widget social più compatti */
  .social-widget {
    padding: 1rem;
  }

  .widget-profile {
    gap: 0.5rem;
  }

  .widget-avatar {
    width: 40px;
    height: 40px;
  }

  .widget-name {
    font-size: 1rem;
  }

  .widget-username {
    font-size: 0.8rem;
  }

  .widget-stats {
    gap: 0.75rem;
    padding: 0.5rem 0;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .widget-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: 90px;
  }

  /* Mappa mobile piccola */
  .google-maps-embed {
    height: 300px !important;
    width: 100% !important;
  }

  .google-maps-embed iframe {
    height: 300px !important;
    width: 100% !important;
  }
}

/* Contact Cards Grid - Uniforme spacing */
.contact-cards-section {
  margin: 1.5rem 0; /* Spaziatura dimezzata: era 3rem */
}

.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; /* Spaziatura dimezzata: era 3rem */
  margin-bottom: 0;
}

/* Social Section - Uniforme spacing */
.social-section {
  margin: 1.5rem 0; /* Spaziatura dimezzata: era 3rem */
}

.social-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem; /* Spaziatura dimezzata: era 3rem */
  margin: 0;
}

/* Maps and Form Section - 50/50 layout con altezze identiche */
.maps-form-section {
  margin: 1.5rem 0; /* Spaziatura dimezzata: era 3rem */
}

.maps-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 split */
  gap: 1.5rem; /* Spaziatura dimezzata: era 3rem */
  align-items: stretch; /* Altezza identica per entrambi */
}

.maps-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.google-maps-embed {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  flex: 1; /* Occupa tutto lo spazio disponibile */
}

.google-maps-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* Contact Form adjustments for side-by-side layout */
.maps-form-grid .contact-form-container {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  height: 100%; /* Stessa altezza della mappa */
  max-width: none; /* Remove max-width constraint */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribuisce il contenuto uniformemente */
}

/* Cursor Pointer per elementi cliccabili */
a,
button,
.contact-link,
.btn,
.social-card-clickable,
.nav-link,
[onclick],
[role="button"] {
  cursor: pointer !important;
}

/* Assicuriamoci che i link abbiano sempre pointer cursor */
a:hover,
.contact-link:hover,
.btn:hover {
  cursor: pointer !important;
}

.menu-toggle:hover span {
  background-color: rgba(255, 255, 255, 0.8);
}

/* --- Responsive Button Layouts for Contacts --- */

@media (max-width: 768px) {
  /* CTA buttons ("Hai domande?") affiancati 50%/50% */
  .cta-buttons {
    gap: 1rem;
  }
  /* Bottoni social 100% */
  .widget-actions .btn,
  .widget-actions .widget-button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: block;
    text-align: center;
  }
  /* Bottone invia messaggio 100% */
  .form-submit {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: block;
    align-self: stretch;
  }
}

@media (max-width: 480px) {
  /* CTA buttons ("Hai domande?") su due righe, 100% */
  .cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  .cta-buttons .btn {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    display: block;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}
