@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

@media (max-width: 375px) and (max-height: 812px) {
  header {
    height: 60vh;
    background-attachment: scroll;
  }
  .hero-content {
    padding: 0 1rem;
    max-width: 90%;
    margin: auto;
  }
  .hero-content h1 {
    font-size: 2.5rem; /* Riduci il font-size per schermi piccoli */
    word-wrap: break-word;
  }
  .hero-content h2 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
 }

/* Modifica lo stile dell'hamburger per la transizione a X */
.hamburger span {
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Contenitore centrale */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header e Hero con effetto Parallax */
header {
  position: relative;
  background: url('./image/iphoneJB.jpg') no-repeat center center/cover;
  height: 80vh;
  color: #fff;
  background-attachment: fixed;
}

header h1 {
  display: inline-block;   /* o display: block; – basta che non sia flex-wrap o simili */
  white-space: nowrap;     /* disabilita l’andare a capo */
}

.header-overlay {
  background: rgba(0, 0, 0, 0.5);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Navbar in stato iniziale: visibile in alto con background gray */
.navbar {
  position: fixed;
  top: 2.5cm;
  left: 0;
  width: 100%;
  background-color: rgb(50, 50, 50);
  z-index: 1000;
  padding: 27px 20px;
  transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

/* Quando si esegue lo scroll: la navbar diventa trasparente e nasconde i link */
.navbar.scrolled {
  background-color: transparent;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Link della navbar */
.nav-links {
  list-style: none;
  display: flex;
}

.nav-links a {
  margin-left: 1.5rem;
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: green;
}

/* Pulsante hamburger: nascosto di default */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
}

/* In stato iniziale, non è visibile, ma quando la navbar scrolled viene attivato */
.navbar.scrolled .hamburger {
  display: flex;
  background-color: black;
}

/* Barre del pulsante hamburger */
.hamburger span {
  width: 20px;
  height: 3.5px;
  background-color: white;
}

/* In stato di scroll, i link vengono nascosti */
.navbar.scrolled .nav-links {
  display: none;
}

/* Menu mobile: posizionato a sinistra sotto il pulsante hamburger */
.mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 3px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: hidden;
  z-index: 2000;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu ul li a {
  display: block;
  padding: 10px 20px;
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}

.mobile-menu ul li a:last-child {
  border-bottom: none;
}

/* Hero Content */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 0 1rem;
}

.hero-content h1,
.hero-content h2,
.hero-content p {
  width: 100%;
  margin: 0;
}

.hero-content h1 {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
}

.hero-content h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.hero-content p {
  font-size: 1.8rem;
}

/* Padding-top per il main per evitare che la navbar copra i contenuti */
.main-padding {
  height: 100px;
}

/* Sezioni principali */
.section {
  padding: 4rem 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #333;
}

/* Cards */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  width: calc(33.333% - 1rem);
  min-width: 250px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card .card-image {
  width: 100%;
  height: 150px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  margin-bottom: 1rem;
  transition: background-image 0.3s ease;
}

.btn-external {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: black;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn-external:hover {
  background-color: #0d5bbd;
}

/* Immagini card specifiche */
.card.diagnosi .card-image {
  background-image: url('./image/willtek.png');
}
.card.diagnosi:hover .card-image {
  background-image: url('./image/microscopio.jpg');
}

.card.riparazione .card-image {
  background-image: url('./image/smd.jfif');
}
.card.riparazione:hover .card-image {
  background-image: url('./image/pcb.jfif');
}

.card.recupero .card-image {
  background-image: url('./image/lente.jpg');
}
.card.recupero:hover .card-image {
  background-image: url('./image/HuaweiEDL.png');
}

.card.aggiornamento .card-image {
  background-image: url('./image/odin.jfif');
}
.card.aggiornamento:hover .card-image {
  background-image: url('./image/swHuawei.jpg');
}

.card.assistenza .card-image {
  background-image: url('./image/phone.jpg');
}
.card.assistenza:hover .card-image {
  background-image: url('./image/pcPhone.jpg');
}

.card.sviluppo .card-image {
  background-image: url('./image/web.jfif');
}
.card.sviluppo:hover .card-image {
  background-image: url('./image/webcode.jpg');
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.card p {
  font-size: 1rem;
}

/* Sezione PerchÃ© sceglierci */
.whyus p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Sezione Chi siamo */
.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.about-content img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.about-text .title {
  font-style: "Montserrat", sans-serif;
  color: #777;
  margin-bottom: 1rem;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Sezione Dove siamo */
.where .map-container {
  margin-top: 1rem;
}

/* Sezione Contatti */
.contact p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-item svg {
  margin-right: 5px;
}

#contact a:hover {
  opacity: 0.7;
}

/* Footer */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 3rem 0;
  margin-top: 2rem;
}

footer p {
  white-space: nowrap;      /* Impedisce la rottura su più righe */
  overflow: hidden;         /* Nasconde eventuale testo che sborda */
}

footer .social-links {
  margin-bottom: 0.5rem;
}

footer .social-links a {
  display: inline-block;
  margin: 0 0.5rem;
  transition: opacity 0.3s ease;
}

footer .social-links a:hover {
  opacity: 0.7;
}

footer .social-links img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* Sezione Dove siamo e Direzioni */
.where-contact-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.where-contact-container .section.where {
  flex: 2;
  min-width: 300px;
}

.where-contact-container .directions-section {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  margin-top: 14rem;
}

.directions-section .column.address {
  background-color: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.directions-section .title {
  font-weight: bold;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.directions-section .address {
  margin-bottom: 1rem;
}

.btn-get-direction {
  margin-top: 1rem;
}

.form-control__button {
  display: inline-block;
  background-color: #1a73e8;
  color: white;
  padding: 1.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.form-control__button:hover {
  background-color: #0d5bbd;
}

/* Mappa responsive */
.map-container iframe {
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

/* Stile orizzontale per HR */
.hr {
  border-bottom: 2px solid black;
  position: relative;
  text-align: center;
}

/* Link specifico per l'icona */
.nav-links a[href="#where"] {
  display: inline-block;
  line-height: 0;
}

.pin.css-wtd7b8 {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

/* Testo su sfondo scuro */
.text-bg-dark {
  background-color: black;
  color: white;
  padding: 0.1em;
}
  
/* Media query per dispositivi mobili */
@media (max-width: 768px) {
  .where-contact-container {
    flex-direction: column;
  }
  
  .where-contact-container .section.where,
  .where-contact-container .directions-section {
    flex: 1 1 100%;
  }
  
  .directions-section {
    margin-top: 0;
  }
}
