/* FONT LOCALI */
@font-face {font-family: 'Playfair Display';font-style: normal;font-weight: 700;src: url('./playfair-display-700.woff2') format('woff2');}
@font-face {
  font-display: swap; 
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/montserrat-v31-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
#miele { background-image: url('/miele.webp'); }
#biscotti { background-image: url('/biscotti.jpg'); }
#stimmi { background-image: url('/stimmi.jpg'); }

/* STILI GENERALI */
body { font-family: 'Montserrat', sans-serif; background-color: #fcfbf9; color: #595959; margin: 0; padding: 0; -webkit-font-smoothing: antialiased;}
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 700; margin: 0px; }
p {font-size: 15px;}
a { color: #960000; text-decoration: none; font-weight: bold; }

/* HEADER */
.header { 
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('cover.jpg');
  background-size: cover;
  background-position: center;
  color: white; 
  padding: 40px 20px; 
  text-align: center;
  position: relative; 
}
.header h1 { margin: 0; font-size: 42px; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
#logo {background-image: url(https://castellodisanfabiano.com/images/logos/castello-di-san-fabiano_bianco.png);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    width: 100%;
    height: 120px;}
.lang-selector { 
  position: absolute; top: 20px; right: 20px; 
  background: rgba(255,255,255,0.2); color: white; 
  border: 1px solid rgba(255,255,255,0.5); padding: 5px; 
  border-radius: 5px; outline: none;
}

/* AREA LOGIN */
.form-wrapper {display: grid;max-width: 500px;margin: -30px auto 80px auto;padding: 0 20px;position: relative;z-index: 10;}
.form-container {border-radius: 20px;transition: all 0.3s ease;position: absolute;width: stretch;margin: 0px 20px;}

#formTrigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #960000;
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 400;
    font-size: 18px;
    transition: all 0.3s ease;
    letter-spacing: -0.5px
}

#formTrigger:hover { background-color: #7a0000; }
#formTrigger .arrow {
    font-size: 22px;
    background: white;
    color: #960000;
    border-radius: 30px;
    width: 30px;
    height: 30px;
    line-height: 28px; /* Allineamento freccia */
    text-align: center;
    transition: transform 0.3s ease;
}

.trigger-active #formTrigger { background-color: white; color: #960000; margin-bottom: 10px; }
.trigger-active { box-shadow: 0 15px 35px rgba(0,0,0,0.1); background: white; transition: all 0.3s ease; }
.trigger-active #formTrigger .arrow { transform: rotate(90deg); margin-left: 10px; }

#wifiForm { transition: opacity 0.5s ease, transform 0.5s ease; transform: translateY(-10px); padding: 0px 20px; }
.name-row { display: flex; gap: 10px; }
input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }
#privacy, #marketing {width: auto;margin: 0 5px;}
.checkbox-group { text-align: left; margin: 10px 0 20px; }
.checkbox-label {
    margin-bottom: 5px;
    font-size: 11px;
    color: #555;
    display: inline-flex;
    align-content: center;
    align-items: center;
    justify-content: flex-start;
    background: #f8f8f8;
    padding: 5px 0px;
    border-radius: 5px;
    width: 100%;
}
button {
    background-color: #960000;
    color: white;
    border: none;
    padding: 15px;
    font-size: 15px;
    border-radius: 15px;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    font-family: Montserrat;
    letter-spacing: -0.5px;
    font-weight: 500;
    margin-bottom: 20px;
}
button:hover { background-color: #7a0000; }

/* SEZIONE PRODOTTI ZAFFERANO */
.promo-section { max-width: 1200px; margin: 0 auto; padding: 0px 20px 40px 20px; text-align: center; overflow: hidden;}
.promo-section h2 {color: #960000;font-size: 30px;}
.promo-grid {margin-top: 20px;display: flex;flex-direction: row;gap: 25px;justify-content: center;align-items: stretch;}
.promo-card { 
  background: white; 
  flex: 1;
  border-radius: 15px; 
  overflow: hidden; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
  text-align: left;
  display: flex;
  flex-direction: column;
}
.promo-image {height: 220px;background-size: cover; background-position: center;}
.promo-content { padding: 20px; flex-grow: 1; }
.promo-card h3 { margin: 0 0 12px 0; color: #960000; font-size: 20px; }
.promo-card p { margin: 0; font-size: 15px; line-height: 1.6; color: #666; }
#successBox { position: unset; display: none; margin: 0px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); background: white;}
h2#t-successTitle {
    font-family: Montserrat;
    font-size: 18px;
    text-align: center;
}
footer { padding: 40px 0; font-size: 13px; color: #999; text-align: center; background: #fff; border-top: 1px solid #eee; }

/* RESPONSIVE & MOBILE CAROUSEL */
@media (max-width: 900px) {
  /* Trasformazione in Carousel */
  .promo-grid { 
    flex-direction: row; 
    justify-content: flex-start;
    overflow-x: auto; 
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 0 30px;
    scrollbar-width: none;
  }
  .promo-grid::-webkit-scrollbar { display: none; }

  .promo-card { 
    min-width: 85%; 
    max-width: 85%;
    scroll-snap-align: center;
  }
  
  /* Animazione Colpetto (Hinting) */
  @keyframes hintSwipe {
    0% { transform: translateX(0); }
    30% { transform: translateX(-40px); }
    100% { transform: translateX(0); }
  }
  .swipe-hint { animation: hintSwipe 1s ease-in-out; }

  .header h1 { font-size: 25px; }
  #t-subtitle {margin: 0px 10px 25px;}
}