/* =========================
   RESET & BASE
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #faf7f2;
  color: #222;
  line-height: 1.7;
  font-size: 17px;
}

/* =========================
   HEADER SITO + NAV
========================= */

.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f6b93b;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7de;
  flex-shrink: 0;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-text {
  line-height: 1.2;
}

.logo-top {
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.logo-bottom {
  font-weight: 700;
  font-size: 1.15rem;
}

/* NAV DESKTOP */

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  font-size: 0.95rem;
}

.main-nav a:hover {
  background: #ffe9bf;
  color: #000;
  transform: translateY(-1px);
}

.main-nav a.active {
  background: #f6b93b;
  color: #000;
}

/* HAMBURGER */

.nav-toggle {
  all: unset;
  display: none; /* solo mobile */
  cursor: pointer;
  margin-left: auto;
  padding: 0.2rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #333;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================
   LAYOUT MAIN
========================= */

main {
  padding: 2rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   HERO
========================= */

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  background: #fff2cc;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.hero-box {
  background: #fff;
  padding: 1.3rem;
  border-radius: 1.5rem;
  box-shadow: 0 8px 25px rgba(0,0,0,0.04);
  font-size: 0.9rem;
}

/* =========================
   HERO BUTTONS
========================= */

.hero-buttons {
  margin-top: 1rem;
}
/* Pulsante Info visite bianco dentro la hero */
.hero-buttons .btn-info-visite {
  background: #ffffff !important;
  color: #444 !important;
  border: 1px solid #f6b93b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}


.hero-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-buttons button {
  background: #f6b93b;
  color: #000;
  border: none;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-buttons button:hover {
  background: #ffcb5c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-primary {
  background: #f6b93b;
  color: #000;
}

.btn-secondary {
  background: #fff;
  color: #222;
  border: 1px solid #f6b93b;
}

.btn-secondary:hover {
  background: #fff7de;
}

.btn-ghost {
  background: transparent;
  color: #555;
  border: 1px solid #e6d9c5;
}

.btn-ghost:hover {
  background: #fff7de;
  color: #222;
}

/* Pulsante Info visite: bianco, centrato */

.hero-info-visite-wrapper {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
}


.btn-info-visite {
  padding: 0.45rem 1.6rem;
  border-radius: 999px;
  background: #ffffff !important;
  border: 1px solid #f6b93b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.2s ease-in-out;
}

.btn-info-visite:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* =========================
   STATS BAR
========================= */

.stats-bar {
  margin-top: 1.4rem;
  padding: 0.7rem 0.9rem;
  border-radius: 1rem;
  background: #fffdf8;
  border: 1px solid #f2e7d8;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.8rem;
}

.stat {
  min-width: 120px;
}

.stat-label {
  display: block;
  color: #777;
  margin-bottom: 0.1rem;
}

.stat-value {
  font-weight: 700;
  font-size: 1rem;
  color: #c78c2b;
}

/* =========================
   SEZIONI, CARD, TABELLE
========================= */

.section-title {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

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

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  padding: 1.1rem 1.3rem;
  border-radius: 1.2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  border: 1px solid #f2e7d8;
  font-size: 0.95rem;
  min-height: 260px;
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.card p {
  flex-grow: 1;
}

.card small {
  font-size: 0.8rem;
  color: #777;
}

/* Azioni nelle card */

/* Azioni nelle card: bottoni centrati, affiancati, senza sovrapposizioni */
.card-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;       /* se manca spazio vanno sotto in ordine, non uno sopra l'altro */
}

/* Stile base bottoni piccoli */
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #f6b93b;
  background: #fffdf8;
  color: #444;
  cursor: pointer;
  white-space: nowrap;         /* evita che il testo spezzi male */
  transition: all 0.18s ease-out;
}

.btn-mini:hover {
  background: #f6b93b;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

/* Pulsante "Richiedi uova" bianco */
.btn-mini.btn-incubazione {
  background: #ffffff !important;
  color: #333 !important;
  border: 1px solid #f6b93b !important;
  box-shadow: none !important;
}

.btn-mini.btn-incubazione:hover {
  background: #fff7de !important;
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


/* Tabelle */

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
}

th, td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f3eee4;
  vertical-align: middle;
}

th {
  background: #fff6e3;
  text-align: left;
  font-weight: 600;
}

/* =========================
   FORM GENERICI
========================= */

form {
  background: #fff;
  padding: 1.1rem 1.3rem;
  border-radius: 1.2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  border: 1px solid #f2e7d8;
  max-width: 700px;
  font-size: 0.95rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid #e1d6c4;
  font-size: 0.9rem;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  background-color: #fffdf8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f6b93b;
  box-shadow: 0 0 0 2px rgba(246,185,59,0.15);
}

button {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #f6b93b;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

button:hover {
  background: #ffcb5c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* =========================
   INFO BOX
========================= */

.info-box {
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  background: #fff7de;
  border-radius: 0.9rem;
  margin: 0.5rem 0 1rem;
}

/* =========================
   BOTTONI AZIONE ADMIN
========================= */

.btn-action {
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  display: inline-block;
}

.btn-accept {
  background: #27ae60;
  color: #fff;
  margin-right: 4px;
}

.btn-reject {
  background: #e74c3c;
  color: #fff;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* =========================
   HEADER ADMIN (compatibilità)
========================= */

.admin-header-wrapper {
  background: #222;
  color: #f8f8f8;
  padding: 0.7rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-brand {
  font-weight: 600;
  font-size: 1rem;
}

.admin-nav {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  color: #f8f8f8;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.admin-nav a:hover {
  background: #444;
}

.admin-nav a.active {
  background: #f6b93b;
  color: #222;
}

.admin-user-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* =========================
   LOGIN / REGISTRAZIONE
========================= */

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #f6b93b;
  border-radius: 50%;
  background-color: #fffdf8;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}

input[type="radio"]:checked {
  background-color: #f6b93b;
  box-shadow: 0 0 0 3px rgba(246,185,59,0.25);
}

input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(246,185,59,0.35);
}

label input[type="radio"] + span {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
  user-select: none;
  transition: color 0.2s;
}

label:hover input[type="radio"] + span {
  color: #000;
}

.auth-mode-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2rem auto 1rem;
  text-align: center;
  flex-wrap: wrap;
}

.auth-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 2px solid #f6b93b;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: #333;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(246,185,59,0.15);
}

.auth-option:hover {
  background: #fff8e1;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(246,185,59,0.25);
}

.auth-option input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #f6b93b;
  border-radius: 50%;
  background-color: #fffdf8;
  transition: all 0.2s ease;
}

.auth-option input[type="radio"]:checked {
  background-color: #f6b93b;
  box-shadow: 0 0 0 3px rgba(246,185,59,0.3);
}

.auth-option span {
  pointer-events: none;
}

.auth-mode-subtitle {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-container {
  max-width: 480px;
  margin: 2.5rem auto 4rem;
  background: #fff;
  border-radius: 1.6rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid #f2e6d3;
  transition: all 0.3s ease;
}

.auth-container h3 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 1rem;
}

.auth-container input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border-radius: 0.8rem;
  border: 1px solid #e6d9b6;
  background: #fffdf6;
}

.auth-container button {
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  background: #f6b93b;
  color: #222;
}

/* =========================
   BOX GIALLO
========================= */

.yellow-box {
  background: #fff8e1;
  border: 1px solid #f6b93b;
  border-radius: 1.2rem;
  padding: 1.5rem 1.8rem;
  max-width: 640px;
  margin: 2rem auto;
  box-shadow: 0 4px 18px rgba(246,185,59,0.15);
}

.yellow-box h3 {
  color: #5c4105;
  margin-bottom: 0.6rem;
}

.yellow-box p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
}

/* =========================
   FOOTER
========================= */

footer {
  padding: 1.2rem 2rem 1.8rem;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .site-header {
    padding: 0.7rem 1rem;
    gap: 0.8rem;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fffdf8;
    border-bottom: 1px solid #f0e2c2;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    display: none;
    z-index: 90;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 1rem 0.9rem;
    gap: 0.3rem;
  }

  .main-nav a {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 0.7rem;
    font-size: 0.9rem;
  }

  .main-nav.open {
    display: block;
  }

  main {
    padding: 1.2rem 1rem 2rem;
    max-width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-box {
    margin-top: 0.5rem;
  }

  .yellow-box {
    margin: 1.4rem auto 0.8rem;
    padding: 1.2rem 1rem;
    max-width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .card,
  .auth-container {
    padding: 1.1rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    margin: 0 auto;
    max-width: 100%;
  }

  .hero-buttons-row {
    flex-direction: column;
    align-items: stretch;
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.45rem 0.5rem;
  }

  footer {
    padding: 0.9rem 1rem 1.4rem;
    font-size: 0.7rem;
  }
}
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .logo-bottom {
    font-size: 1rem;
  }

  .auth-option span {
    font-size: 0.85rem;
  }
}

/* MOBILE: sistemazione pulsanti hero */
@media (max-width: 768px) {

  /* Contenitore pulsanti: colonna */
  .hero-buttons {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  /* Riga dei 3 pulsanti principali: colonna full width */
  .hero-buttons-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
  }

  .hero-buttons-row button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  /* Wrapper del pulsante Info visite */
  .hero-info-visite-wrapper {
    margin-top: 0.3rem;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Pulsante Info visite: bianco, full width su mobile */
  .hero-info-visite-wrapper .btn-info-visite {
    display: block;
    width: 100%;
    max-width: 100%;
    background: #ffffff !important;
    color: #444 !important;
    border: 1px solid #f6b93b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-align: center;
  }
}
